diff options
author | Ranjani Vaidyanathan <ra5478@freescale.com> | 2011-05-11 19:13:43 -0500 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2012-07-20 13:13:49 +0800 |
commit | c2c4bcd3da05b28bd34a7d15e560ccd8e1c7f1f2 (patch) | |
tree | 2fc87e0cbec7eb6affbe0d1158c8ced756dc3855 /drivers/regulator | |
parent | 2e3a80b7be1c8a4f73c6479697b9e58674f4fcaf (diff) |
ENGR00143294-1: Fix bug in MC13892 driver
In set_voltage function, all voltages are not in microvolts.
Hence set_voltage function was failing. Change all voltages in
the function to be in microvolts.
Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/mc13892-regulator.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/regulator/mc13892-regulator.c b/drivers/regulator/mc13892-regulator.c index 3285d41842f2..04ce02869d9c 100644 --- a/drivers/regulator/mc13892-regulator.c +++ b/drivers/regulator/mc13892-regulator.c @@ -452,12 +452,11 @@ static int mc13892_sw_regulator_set_voltage(struct regulator_dev *rdev, if (ret) goto err; + hi = val & MC13892_SWITCHERS0_SWxHI; if (value > 1375000) hi = 1; - else if (value < 1100000) + if (value < 1100000) hi = 0; - else - hi = valread & MC13892_SWITCHERS0_SWxHI; if (hi) { value = (value - 1100000) / 25000; |