summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2016-03-14 16:36:45 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-03-15 18:05:56 -0700
commite21f3401e136ba1ed25272356aa5d446d083a5ad (patch)
tree709e5f30152ee026caeb6d7189f15f5c16b05da5
parent06d3155c51c5024be567ad5a2f5bc3a76141176f (diff)
downloadchrome-ec-e21f3401e136ba1ed25272356aa5d446d083a5ad.tar.gz
chell: Indicate when charging in suspend
Currently when in suspend the LED blinks white no matter what the state of the battery or charging is. This is very confusing for users who expect to be able to plug in a charger with the system in suspend and see that it starts to charge. Past platforms from this OEM have had two LEDs so this has not been an issue. BUG=chrome-os-partner:49151 BRANCH=glados TEST=put chell in suspend, plug in charger to see amber LED and then remove the charger and see that it blinks white again. Change-Id: I60e849d7b8b717fb568d7d5d64046621c1c34157 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/332625 Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r--board/chell/led.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/board/chell/led.c b/board/chell/led.c
index 0f92de1c75..c117e53a3e 100644
--- a/board/chell/led.c
+++ b/board/chell/led.c
@@ -93,8 +93,13 @@ static void board_led_set_battery(void)
if (!previous_state_suspend)
power_ticks = 0;
- /* Blink once every one second. */
- bat_led_set_color((power_ticks & 0x4) ? LED_WHITE : LED_OFF);
+ if (charge_get_state() == PWR_STATE_CHARGE)
+ /* Always indicate when charging, even in suspend. */
+ bat_led_set_color(LED_AMBER);
+ else
+ /* Blink once every one second. */
+ bat_led_set_color((power_ticks & 0x4) ?
+ LED_WHITE : LED_OFF);
previous_state_suspend = 1;
return;