projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cdb868f
)
lp3971: Fix BUCK_VOL_CHANGE_SHIFT logic
author
Axel Lin
<
[email protected]
>
Thu, 11 Mar 2010 01:50:07 +0000
(09:50 +0800)
committer
Liam Girdwood
<
[email protected]
>
Mon, 22 Mar 2010 19:44:45 +0000
(19:44 +0000)
Given x=0,1,2, current implementation of BUCK_VOL_CHANGE_SHIFT(x) returns 0,4,8.
The correct return value should be 0,4,6.
This patch fix the logic.
Signed-off-by: Axel Lin <
[email protected]
>
Acked-by: Marek Szyprowski <
[email protected]
>
Acked-by: Mark Brown <
[email protected]
>
Signed-off-by: Liam Girdwood <
[email protected]
>
drivers/regulator/lp3971.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/lp3971.c
b/drivers/regulator/lp3971.c
index 8bdcf41ab68c62634e4529afd4419499bf80a8b5..b20b3e1d821a4bf679c82394199ce11e78ad8cd3 100644
(file)
--- a/
drivers/regulator/lp3971.c
+++ b/
drivers/regulator/lp3971.c
@@
-45,7
+45,7
@@
static int lp3971_set_bits(struct lp3971 *lp3971, u8 reg, u16 mask, u16 val);
LP3971_BUCK2 -> 4
LP3971_BUCK3 -> 6
*/
-#define BUCK_VOL_CHANGE_SHIFT(x) (((
1 << x) & ~0x01) << 1
)
+#define BUCK_VOL_CHANGE_SHIFT(x) (((
!!x) << 2) | (x & ~0x01)
)
#define BUCK_VOL_CHANGE_FLAG_GO 0x01
#define BUCK_VOL_CHANGE_FLAG_TARGET 0x02
#define BUCK_VOL_CHANGE_FLAG_MASK 0x03