diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-06-08 05:21:44 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-11 00:09:14 -0400 |
commit | 23ca6bf2318fecfbb9cd9d524e82d5029ef365bf (patch) | |
tree | 5d32920931ea8f314ef76d85335c865cc0dbf897 /drivers/regulator/max77686.c | |
parent | 98a175b60f46a80dfa44fb0e0807f2e5a351f35f (diff) |
regulator: max77686: Fix the delay time for set_voltage_time_sel
rdev->desc->uV_step * abs(new_selector - old_selector) returns uV.
The unit of ramp_rate is mV/us.
Thus 1000 should be multiplied.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Reviewed-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/max77686.c')
-rw-r--r-- | drivers/regulator/max77686.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c index b0c146df42d1..2dd4ac91d283 100644 --- a/drivers/regulator/max77686.c +++ b/drivers/regulator/max77686.c | |||
@@ -77,7 +77,7 @@ static int max77686_set_dvs_voltage_time_sel(struct regulator_dev *rdev, | |||
77 | 77 | ||
78 | return DIV_ROUND_UP(rdev->desc->uV_step * | 78 | return DIV_ROUND_UP(rdev->desc->uV_step * |
79 | abs(new_selector - old_selector), | 79 | abs(new_selector - old_selector), |
80 | ramp_rate[max77686->ramp_delay]); | 80 | ramp_rate[max77686->ramp_delay] * 1000); |
81 | } | 81 | } |
82 | 82 | ||
83 | static int max77686_set_voltage_time_sel(struct regulator_dev *rdev, | 83 | static int max77686_set_voltage_time_sel(struct regulator_dev *rdev, |
@@ -85,7 +85,7 @@ static int max77686_set_voltage_time_sel(struct regulator_dev *rdev, | |||
85 | { | 85 | { |
86 | /* Unconditionally 100 mV/us */ | 86 | /* Unconditionally 100 mV/us */ |
87 | return DIV_ROUND_UP(rdev->desc->uV_step * | 87 | return DIV_ROUND_UP(rdev->desc->uV_step * |
88 | abs(new_selector - old_selector), 100); | 88 | abs(new_selector - old_selector), 100 * 1000); |
89 | } | 89 | } |
90 | 90 | ||
91 | static struct regulator_ops max77686_ops = { | 91 | static struct regulator_ops max77686_ops = { |