diff options
author | james_chao <james_chao@asus.com> | 2017-04-12 22:58:33 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-04-13 12:55:33 -0700 |
commit | c487e18a3f203dc8793e884730eb66b2706deb26 (patch) | |
tree | d609626e5213cdfb490f61eb7094885136a74ec4 | |
parent | 26c325d15e2fa47bbe26636939fb29779d02bc57 (diff) | |
download | chrome-ec-c487e18a3f203dc8793e884730eb66b2706deb26.tar.gz |
led_policy_std: turn off power led when system shutdownstabilize-9460.60.Bstabilize-9460.40.Bstabilize-9460.4.Bstabilize-9460.23.B
The led is control by HOOK_SECOND, but if dut press ALT+VOL_UP+H, enter
hibernate mode when system in s0, there is no one second to turn off the
power led, so the power led is still on when system enter hibernate.
BUG=b:36328757
BRANCH=gru
TEST=press ALT+VOL UP+H, the power led turn off and system enter
hibernate mode.
Change-Id: I72d18876aa5468131bae7ad42203982d123db8ba
Signed-off-by: james_chao <james_chao@asus.com>
Reviewed-on: https://chromium-review.googlesource.com/476850
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r-- | common/led_policy_std.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common/led_policy_std.c b/common/led_policy_std.c index 416d8495ed..631d905754 100644 --- a/common/led_policy_std.c +++ b/common/led_policy_std.c @@ -124,6 +124,14 @@ int led_set_brightness(enum ec_led_id led_id, const uint8_t *brightness) return EC_SUCCESS; } +#ifdef HAS_TASK_CHIPSET +static void std_led_shutdown(void) +{ + pwr_led_set_color(LED_OFF); +} +DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, std_led_shutdown, HOOK_PRIO_DEFAULT); +#endif + static void std_led_set_power(void) { static int power_second; |