dect
/
linux-2.6
Archived
13
0
Fork 0

regulator: max8997: Fix setting inappropriate value for ramp_delay variable

The ramp_delay variable can be set lower than the desired value.
This patch fixes it.

Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: KyungMin Park <kyungmin.park@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
This commit is contained in:
Donggeun Kim 2011-07-07 16:51:56 +09:00 committed by Liam Girdwood
parent 90609503b7
commit 6ff325a2d8
1 changed files with 2 additions and 1 deletions

View File

@ -544,7 +544,8 @@ static int max8997_set_voltage_ldobuck(struct regulator_dev *rdev,
rid == MAX8997_BUCK4 || rid == MAX8997_BUCK5) {
/* If the voltage is increasing */
if (org < i)
udelay(desc->step * (i - org) / max8997->ramp_delay);
udelay(DIV_ROUND_UP(desc->step * (i - org),
max8997->ramp_delay));
}
return ret;