Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: s2mpa01: Use correct register for buck1 ramp delay

Fix the register for ramp delay of buck1 regulator. Buck1 and buck6
share the field (offset 4) in ramp delay register S2MPA01_REG_RAMP2.

The driver used the same register and field for ramp delay of buck3 and
buck1. This lead to updating of ramp delay of buck3 when setting buck1
and actually the ramp delay of buck1 was never set.

Fixes: f18792714608 ("regulator: Add support for S2MPA01 regulator")
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: <stable@vger.kernel.org>

authored by

Krzysztof Kozlowski and committed by
Mark Brown
112da5cb c9eaa447

-1
-1
drivers/regulator/s2mpa01.c
··· 116 116 ramp_delay = s2mpa01->ramp_delay16; 117 117 118 118 ramp_shift = S2MPA01_BUCK16_RAMP_SHIFT; 119 - ramp_reg = S2MPA01_REG_RAMP1; 120 119 break; 121 120 case S2MPA01_BUCK2: 122 121 enable_shift = S2MPA01_BUCK2_RAMP_EN_SHIFT;