From e837097b91c87af9ffa27756c3bf001047bae828 Mon Sep 17 00:00:00 2001 From: Henry Hsu Date: Fri, 18 Oct 2013 15:13:15 +0800 Subject: Off the power led when S3 and S5 Remove the comment for battery error and the final behavior is: 1.Under DC mode, LED is off when system enters to(S3 & S5) and will be on when resume. 2.Once plugging in adapter ,LED will be on soon if battery is not full. BUG=chrome-os-partner:23373 BRANCH=Wolf TEST=manual login then LID close(enter S3), LED be off. logout then LID close(enter S5), LED be off. Change-Id: I4414082d23cfbd77fb34693d2dbf037150ef5634 Signed-off-by: Henry Hsu Reviewed-on: https://chromium-review.googlesource.com/173661 Reviewed-by: Dave Parker --- common/led_wolf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/led_wolf.c b/common/led_wolf.c index 9212d467ac..0df2493edc 100644 --- a/common/led_wolf.c +++ b/common/led_wolf.c @@ -55,10 +55,12 @@ static void led_tick(void) bat_led_set_color(LED_OFF); break; case PWR_STATE_DISCHARGE: - bat_led_set_color(LED_AMBER); + if (chipset_in_state(CHIPSET_STATE_ON)) + bat_led_set_color(LED_AMBER); + else + bat_led_set_color(LED_OFF); break; case PWR_STATE_ERROR: - /*FIXME Now keep blink amber till the new spec arrival */ bat_led_set_color((ticks & 0x2) ? LED_AMBER : LED_OFF); break; case PWR_STATE_IDLE: -- cgit v1.2.1