diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2015-09-12 00:29:49 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-09-19 12:27:21 -0700 |
commit | e24cca580ef0b83ff86cbf9273653a821b6f8f14 (patch) | |
tree | 21c914aba10102c46c5fee3d92c3638210de33d2 /include/lb_common.h | |
parent | d341615383f1ea5d3a540a67bcec777ba902bdfb (diff) | |
download | chrome-ec-e24cca580ef0b83ff86cbf9273653a821b6f8f14.tar.gz |
common: lightbar: put multiple commands under i2c_lock
If other i2c traffic happens around the time the light bar is
initialized, the i2c bus is wedged.
Instead of waiting 500ms in the motion task loop for the tap sequence to
complete, set under i2c lock the lp power and init sequence.
BRANCH=smaug, samus
BUG=chrome-os-partner:45223
TEST=With msleep(500) removed and With lb_power + lb_init + 100ms, I don't see the wedge at TAP
sequence.
Change-Id: I931eb25bcc5e3237b6c569f2330f72f9fc415964
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/299543
Reviewed-by: Bill Richardson <wfrichar@google.com>
Diffstat (limited to 'include/lb_common.h')
-rw-r--r-- | include/lb_common.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/lb_common.h b/include/lb_common.h index b68540176b..ef357e98ea 100644 --- a/include/lb_common.h +++ b/include/lb_common.h @@ -23,7 +23,7 @@ void lb_set_brightness(unsigned int newval); /* Get the overall brighness level. */ uint8_t lb_get_brightness(void); /* Initialize the IC controller registers to sane values. */ -void lb_init(void); +void lb_init(int use_lock); /* Disable the LED current off (the IC stays on). */ void lb_off(void); /* Enable the LED current. */ |