projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d87b969
)
regulator: fix voltage range in da9034 ldo12
author
Haojian Zhuang
<haojian.zhuang@marvell.com>
Mon, 21 Sep 2009 16:14:12 +0000
(12:14 -0400)
committer
Liam Girdwood
<lrg@slimlogic.co.uk>
Tue, 22 Sep 2009 12:58:23 +0000
(13:58 +0100)
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>
drivers/regulator/da903x.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/da903x.c
b/drivers/regulator/da903x.c
index c9de730984709b4dba82c17b8e962941c4e54636..aa224d936e0de4c92665faf14115bc5592e63bde 100644
(file)
--- 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;