diff options
author | Bill Richardson <wfrichar@chromium.org> | 2012-05-21 17:30:27 -0700 |
---|---|---|
committer | Bill Richardson <wfrichar@chromium.org> | 2012-05-22 12:58:16 -0700 |
commit | b0847a726a68bda2a81cff3926349f9e11039edc (patch) | |
tree | 72d670f9e7cc8e3d06ef5eb7b78fad627b18d7e4 /common/lightbar.c | |
parent | aa5397e48429ee7e272164923c3754025a9cd4a0 (diff) | |
download | chrome-ec-b0847a726a68bda2a81cff3926349f9e11039edc.tar.gz |
Notify lightbar task when CPU enters/leaves S5
BUG=none
TEST=none
Change-Id: I07e3751c8fece18cf34d9b7c628fb3c6ab63d6b3
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'common/lightbar.c')
-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) */ /****************************************************************************/ |