diff options
author | Haojian Zhuang <haojian.zhuang@marvell.com> | 2009-09-21 12:14:12 -0400 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2009-09-22 13:58:23 +0100 |
commit | 55c1d7c60d9b269551cd7cc31e6be8323e1d94ec (patch) | |
tree | 7a7bb0472c1ec89a50e5700ce942c43a00169616 /drivers/regulator/da903x.c | |
parent | d87b969d15a084503870da598c97278fb4877753 (diff) | |
download | linux-55c1d7c60d9b269551cd7cc31e6be8323e1d94ec.tar.bz2 |
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>
Diffstat (limited to 'drivers/regulator/da903x.c')
-rw-r--r-- | drivers/regulator/da903x.c | 2 |
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, } val = (min_uV - info->min_uV + info->step_uV - 1) / info->step_uV; - val = (val > 7 && val < 20) ? 8 : val - 12; + val = (val >= 20) ? val - 12 : ((val > 7) ? 8 : val); val <<= info->vol_shift; mask = ((1 << info->vol_nbits) - 1) << info->vol_shift; |