diff options
author | Gerrit <chrome-bot@google.com> | 2012-05-22 14:05:04 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2012-05-22 14:05:04 -0700 |
commit | 5177cf371406895cb31bc6e768d96bb04f869d94 (patch) | |
tree | 9cdc79515918a534c70c6bdf078206f45f49afac | |
parent | 10893940380d36da933e3ad69d2af147e3c194fb (diff) | |
parent | b0847a726a68bda2a81cff3926349f9e11039edc (diff) | |
download | chrome-ec-5177cf371406895cb31bc6e768d96bb04f869d94.tar.gz |
Merge "Notify lightbar task when CPU enters/leaves S5"
-rw-r--r-- | common/lightbar.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/common/lightbar.c b/common/lightbar.c index e07eaf7ae4..7953e664c5 100644 --- a/common/lightbar.c +++ b/common/lightbar.c @@ -602,6 +602,15 @@ void lightbar_sequence(enum lightbar_sequence num) CPRINTF("[%T LB_seq %d - ignored]\n", num); } +/****************************************************************************/ +/* Get notifications from other parts of the system */ + +static int lightbar_startup(void) +{ + lightbar_sequence(LIGHTBAR_S5S3); + return EC_SUCCESS; +} +DECLARE_HOOK(HOOK_CHIPSET_STARTUP, lightbar_startup, HOOK_PRIO_DEFAULT); static int lightbar_resume(void) { @@ -610,7 +619,6 @@ static int lightbar_resume(void) } DECLARE_HOOK(HOOK_CHIPSET_RESUME, lightbar_resume, HOOK_PRIO_DEFAULT); - static int lightbar_suspend(void) { lightbar_sequence(LIGHTBAR_S0S3); @@ -618,6 +626,13 @@ static int lightbar_suspend(void) } DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, lightbar_suspend, HOOK_PRIO_DEFAULT); +static int lightbar_shutdown(void) +{ + lightbar_sequence(LIGHTBAR_S3S5); + return EC_SUCCESS; +} +DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, lightbar_shutdown, HOOK_PRIO_DEFAULT); + /****************************************************************************/ /* Generic command-handling (should work the same for both console & LPC) */ /****************************************************************************/ |