diff options
author | Henry Hsu <Henry.Hsu@quantatw.com> | 2013-11-11 17:34:59 +0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-11-11 22:33:19 +0000 |
commit | 75e8e3858e9f660530a4fbf70c2846cdf29208eb (patch) | |
tree | 5455e441ca16669802deeb60ca39e59942ec057a | |
parent | 3f580b83129488742082178225928a4f09960a3c (diff) | |
download | chrome-ec-75e8e3858e9f660530a4fbf70c2846cdf29208eb.tar.gz |
Change the discharge led behavior
Only affect discharge behavior.
1. Off all the led in S5.
2. Amber in S0/3 till battery capacity more than or equalto 10%.
BUG=chrome-os-partner:23991
BRANCH=Wolf
TEST=manual
Battery only and less the 10%, led is amber in S0/S3, and off
in S5/G3.
Change-Id: If00877df8942e4ce399f06657e22bf1389597e09
Signed-off-by: Henry Hsu <Henry.Hsu@quantatw.com>
Reviewed-on: https://chromium-review.googlesource.com/176327
Reviewed-by: Dave Parker <dparker@chromium.org>
-rw-r--r-- | common/led_wolf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/common/led_wolf.c b/common/led_wolf.c index 0df2493edc..3223bfb74c 100644 --- a/common/led_wolf.c +++ b/common/led_wolf.c @@ -55,8 +55,11 @@ static void led_tick(void) bat_led_set_color(LED_OFF); break; case PWR_STATE_DISCHARGE: - if (chipset_in_state(CHIPSET_STATE_ON)) - bat_led_set_color(LED_AMBER); + if (chipset_in_state(CHIPSET_STATE_ON) || + chipset_in_state(CHIPSET_STATE_SUSPEND)) + bat_led_set_color( + (charge_get_percent() < BATTERY_LEVEL_LOW) ? + LED_AMBER : LED_OFF); else bat_led_set_color(LED_OFF); break; |