aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@marvell.com>2009-09-21 12:14:12 -0400
committerLiam Girdwood <lrg@slimlogic.co.uk>2009-09-22 08:58:23 -0400
commit55c1d7c60d9b269551cd7cc31e6be8323e1d94ec (patch)
tree7a7bb0472c1ec89a50e5700ce942c43a00169616
parentd87b969d15a084503870da598c97278fb4877753 (diff)
regulator: fix voltage range in da9034 ldo12
Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
-rw-r--r--drivers/regulator/da903x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/da903x.c b/drivers/regulator/da903x.c
index c9de73098470..aa224d936e0d 100644
--- a/drivers/regulator/da903x.c
+++ b/drivers/regulator/da903x.c
@@ -301,7 +301,7 @@ static int da9034_set_ldo12_voltage(struct regulator_dev *rdev,
301 } 301 }
302 302
303 val = (min_uV - info->min_uV + info->step_uV - 1) / info->step_uV; 303 val = (min_uV - info->min_uV + info->step_uV - 1) / info->step_uV;
304 val = (val > 7 && val < 20) ? 8 : val - 12; 304 val = (val >= 20) ? val - 12 : ((val > 7) ? 8 : val);
305 val <<= info->vol_shift; 305 val <<= info->vol_shift;
306 mask = ((1 << info->vol_nbits) - 1) << info->vol_shift; 306 mask = ((1 << info->vol_nbits) - 1) << info->vol_shift;
307 307