summaryrefslogtreecommitdiff
path: root/include/lb_common.h
Commit message (Collapse)AuthorAgeFilesLines
* common: lightbar: put multiple commands under i2c_lockGwendal Grignou2015-09-191-1/+1
| | | | | | | | | | | | | | | | | | 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>
* Remove PULSE and TEST sequences from lightbar moduleVic Yang2014-10-081-2/+0
| | | | | | | | | | | | | | | PULSE and TEST sequences are not used anywhere. Remove them to save flash space. Also, fix msleep(MSEC) calls in the unit test; it's essentially usleep(SECOND) written in an incorrect way. BUG=chrome-os-partner:32203 TEST=make buildall BRANCH=None Change-Id: I61ba897df632538eb89364a4c913d5fee87f3864 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/220711 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* lightbar: Enable tap-for-battery even in G3Bill Richardson2014-08-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | This adds an optional lb_power() function that the lightbar TAP sequence can use to briefly power up the lightbar rails while the AP is shut down. BUG=chrome-os-partner:29041 BRANCH=ToT TEST=manual Shut the AP down, then from the EC console run "lightbar seq tap". The lightbar should light up and briefly indicate the current power levels. You can manully force the battery status with "lightbar demo on", then use the arrow keys to change the state. Note that the Samus that I tested on had trouble recognizing when it was charging or not. That's a separate bug. Change-Id: Iad3f08506d9e049e89d0711af00da2f1aa2337e0 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/213664 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Put the lightbar IC controls and pattern logic into separate filesBill Richardson2014-05-151-0/+38
This puts the code that talks to the lightbar hardware in one file, and the code that implements the pretty patterns and behavior into another. This will let us make improvements or changes to the patterns without requiring detailed knowledge of the controller chips. BUG=chrome-os-partner:28596 BRANCH=ToT TEST=make buildall -j Refactoring only. There is no new functionality. Change-Id: I4e5fe8943385ddeab26bbd7e66c20e2dccd3dc43 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/199882 Reviewed-by: Randall Spangler <rspangler@chromium.org>