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:
0d7614f
)
leds: lp8788: Fix updating scale configuration bits
author
Axel Lin
<
[email protected]
>
Wed, 1 Aug 2012 12:40:34 +0000
(20:40 +0800)
committer
Bryan Wu
<
[email protected]
>
Wed, 8 Aug 2012 01:49:53 +0000
(09:49 +0800)
We need to do left shift (cfg->num + LP8788_ISINK_SCALE_OFFSET) bits for
updating scale configuration.
Signed-off-by: Axel Lin <
[email protected]
>
Acked-by: Milo(Woogyom) Kim <
[email protected]
>
Tested-by: Milo(Woogyom) Kim <
[email protected]
>
Signed-off-by: Bryan Wu <
[email protected]
>
drivers/leds/leds-lp8788.c
patch
|
blob
|
history
diff --git
a/drivers/leds/leds-lp8788.c
b/drivers/leds/leds-lp8788.c
index 53bd136f1ef070a1e045b97f8dbc6b55e30c0ca6..0ade6ebfc914dba6e6809b46a428fc9ee219b83e 100644
(file)
--- a/
drivers/leds/leds-lp8788.c
+++ b/
drivers/leds/leds-lp8788.c
@@
-63,7
+63,7
@@
static int lp8788_led_init_device(struct lp8788_led *led,
/* scale configuration */
addr = LP8788_ISINK_CTRL;
mask = 1 << (cfg->num + LP8788_ISINK_SCALE_OFFSET);
- val = cfg->scale <<
cfg->num
;
+ val = cfg->scale <<
(cfg->num + LP8788_ISINK_SCALE_OFFSET)
;
ret = lp8788_update_bits(led->lp, addr, mask, val);
if (ret)
return ret;