summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Hsu <Henry.Hsu@quantatw.com>2013-10-18 15:13:15 +0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-10-21 01:49:09 +0000
commite837097b91c87af9ffa27756c3bf001047bae828 (patch)
treeec7b370f716fbb6fc4b28ecccf9c1e677c87bd19
parent4e342bcf9539d08a3c16ad398d735c418393d466 (diff)
downloadchrome-ec-e837097b91c87af9ffa27756c3bf001047bae828.tar.gz
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 <Henry.Hsu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/173661 Reviewed-by: Dave Parker <dparker@chromium.org>
-rw-r--r--common/led_wolf.c6
1 files 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: