regulator: palmas: Fix off-by-one for ramp_delay and register value mapping
Datasheet says: Time Step (TSTEP) selection, when changing the output voltage, the new value is reached through successive voltage steps (if not bypassed). The equivalent programmable slew rate of the output voltage is: TSTEP[1:0]: 00 Jump (no slope control) TSTEP[1:0]: 01 10mV/us TSTEP[1:0]: 10 5mV/us (default) TSTEP[1:0]: 11 2.5mV/us Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
e31089c608
commit
0ea34b5786
1 changed files with 2 additions and 2 deletions
|
@ -447,9 +447,9 @@ static int palmas_smps_set_ramp_delay(struct regulator_dev *rdev,
|
||||||
|
|
||||||
if (ramp_delay <= 0)
|
if (ramp_delay <= 0)
|
||||||
reg = 0;
|
reg = 0;
|
||||||
else if (ramp_delay < 2500)
|
else if (ramp_delay <= 2500)
|
||||||
reg = 3;
|
reg = 3;
|
||||||
else if (ramp_delay < 5000)
|
else if (ramp_delay <= 5000)
|
||||||
reg = 2;
|
reg = 2;
|
||||||
else
|
else
|
||||||
reg = 1;
|
reg = 1;
|
||||||
|
|
Loading…
Reference in a new issue