]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ENGR00143294-1: Fix bug in MC13892 driver
authorRanjani Vaidyanathan <ra5478@freescale.com>
Thu, 12 May 2011 00:13:43 +0000 (19:13 -0500)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:32:52 +0000 (08:32 +0200)
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>
drivers/regulator/mc13892-regulator.c

index 3285d41842f281d4433cbab2e5752d5b50c1632c..04ce02869d9c4ef9305ef3c70bc1fc092213b0d8 100644 (file)
@@ -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;