From: Axel Lin Date: Tue, 12 Jun 2012 08:36:20 +0000 (+0800) Subject: regulator: wm8400: Adjust the equation for selector >= 15 in wm8400_ldo_list_voltage X-Git-Tag: firefly_0821_release~3680^2~2413^2^2~108 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=74e20e569158063970624e360c8395ac5cffd654;p=firefly-linux-kernel-4.4.55.git regulator: wm8400: Adjust the equation for selector >= 15 in wm8400_ldo_list_voltage 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 Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/wm8400-regulator.c b/drivers/regulator/wm8400-regulator.c index 9f9df8eef1a1..9035dd053611 100644 --- a/drivers/regulator/wm8400-regulator.c +++ b/drivers/regulator/wm8400-regulator.c @@ -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,