summaryrefslogtreecommitdiff
path: root/common/lightbar.c
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2013-01-08 16:53:48 -0800
committerBill Richardson <wfrichar@chromium.org>2013-01-16 13:14:26 -0800
commitc39fd50fb7e3280733c8c547cd2d09935603f073 (patch)
tree0b6a777967b1ca7a3602a6e04a5fb350bb9fed5a /common/lightbar.c
parent2de1227f4437d45d310759f5e4407d7cc9db74f5 (diff)
downloadchrome-ec-release-R23-2913.B.tar.gz
Add AP userspace scripts to tweak lightbar colorsrelease-R23-2913.B
We have yet another tweak for the lightbar, but we don't want to update the EC. This CL adds an init script that runs on the AP at every boot and pokes the EC to modify the lightbar settings. We have to run it at every boot because the EC will hibernate after the AP has been off (not suspended) for an hour on battery power and will lose its settings. There's a corresponding CL for the ec-utils ebuild that installs the userspace scripts into the rootfs. NOTE that in order to cherry-pick this into R23 from ToT, we have to update ectool as well, because the original R23 ectool doesn't implement the "lightbar params" command. However, the EC image that ectool talks to is built from a *different* branch that already has the ectool update, so this change DOESN'T backport any of the EC firmware changes that would otherwise be required. Instead, we just hack a little bit to make the EC firmware compile. BUG=chrome-os-partner:16827 BRANCH=link TEST=manual Build the image for Link, install, reboot. Run "ectool lightbar params". The output should match what's in /usr/share/ec/lightbar_params.txt Original-Change-Id: Ied2304da58d6d27b4f186e621bb187ba9a574e6c Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/41167 Commit-Queue: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Tested-by: Bill Richardson <wfrichar@chromium.org> (cherry picked from commit 024f292edf44a9223d6101edc31571df067a8dce) Change-Id: Iee3f67848c9da92a644083133a70431efabf42aa Reviewed-on: https://gerrit.chromium.org/gerrit/41357 Commit-Queue: Bill Richardson <wfrichar@chromium.org> Tested-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'common/lightbar.c')
-rw-r--r--common/lightbar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/lightbar.c b/common/lightbar.c
index cfb292249d..d0933aa27f 100644
--- a/common/lightbar.c
+++ b/common/lightbar.c
@@ -5,6 +5,9 @@
* LED controls.
*/
+/* Danger, Will Robinson! Danger! See crosbug.com/p/16827 for details */
+#define USE_OLD_LIGHTBAR_STRUCTS_JUST_TO_BACKPORT_BUG_16827
+
#include "battery.h"
#include "battery_pack.h"
#include "charge_state.h"
@@ -267,9 +270,6 @@ static uint32_t pending_msg;
/****************************************************************************/
/* Demo sequence */
-struct rgb_s {
- uint8_t r, g, b;
-};
enum {
COLOR_LOW, COLOR_MEDIUM, COLOR_HIGH, COLOR_FULL, COLOR_BLACK,
};