regulator: wm8400: Adjust the equation for selector >= 15 in wm8400_ldo_list_voltage
authorAxel Lin <axel.lin@gmail.com>
Tue, 12 Jun 2012 08:36:20 +0000 (16:36 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 13 Jun 2012 17:53:23 +0000 (18:53 +0100)
Adjust the equation for selector >= 15 for better readability.
The equation "1700000 + ((selector - 15) * 100000)" can be interpreted by:
Starting from selector 15: Steps of 100mV from 1700mV

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/wm8400-regulator.c

index 9f9df8e..9035dd0 100644 (file)
@@ -28,7 +28,7 @@ static int wm8400_ldo_list_voltage(struct regulator_dev *dev,
        if (selector < 15)
                return 900000 + (selector * 50000);
        else
-               return 1600000 + ((selector - 14) * 100000);
+               return 1700000 + ((selector - 15) * 100000);
 }
 
 static int wm8400_ldo_map_voltage(struct regulator_dev *dev,