summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorRanjani Vaidyanathan <ra5478@freescale.com>2011-05-11 19:13:43 -0500
committerJason Liu <r64343@freescale.com>2012-01-09 20:08:36 +0800
commit6d6b6ac63cabc14a707d8f567379b5042f53c1e0 (patch)
tree73ef909e565a774f6cf20677dff1fccea1e920e0 /drivers/regulator
parentecf14cbcdc2944c35084ca66df7cc4cbf23d54d8 (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.c5
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;