aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-06-11 01:14:50 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-11 01:35:56 -0400
commit578df8babf3b1895d562e1ea0d3a81d1e77e0182 (patch)
tree7bdb85040b4feaa17a59e7419c57cbb156146072 /drivers/regulator
parent23ca6bf2318fecfbb9cd9d524e82d5029ef365bf (diff)
regulator: core: Return correct delay time in regulator_set_voltage_time_sel
rdev->desc->uV_step * abs(new_selector - old_selector) returns uV. The unit of ramp_delay is mV/us. Current code multiples 1000 at wrong place. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index ff76abde3ab..6ffca9b3238 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2299,7 +2299,7 @@ int regulator_set_voltage_time_sel(struct regulator_dev *rdev,
2299 if (rdev->desc->ramp_delay && rdev->desc->uV_step) 2299 if (rdev->desc->ramp_delay && rdev->desc->uV_step)
2300 return DIV_ROUND_UP(rdev->desc->uV_step * 2300 return DIV_ROUND_UP(rdev->desc->uV_step *
2301 abs(new_selector - old_selector), 2301 abs(new_selector - old_selector),
2302 rdev->desc->ramp_delay) * 1000; 2302 rdev->desc->ramp_delay * 1000);
2303 return 0; 2303 return 0;
2304} 2304}
2305 2305