diff options
author | Vic Yang <victoryang@chromium.org> | 2013-07-25 22:23:57 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-08-01 18:15:46 -0700 |
commit | 311812b5697000e68cfe50181997a7d78382c991 (patch) | |
tree | ca7f627bb416cdec31c616a587a046651cca8153 | |
parent | 19ee2c44c566ccd9b9e26490e48cbdfc027a2c78 (diff) | |
download | chrome-ec-311812b5697000e68cfe50181997a7d78382c991.tar.gz |
spring: Show yellow LED for battery not fully charged in idle state
Even if the charge state machine is in idle mode, we should still show
yellow LED if the battery is not fully charged. This prevents the case
where the LED is green when the battery just comes back from cut-off
mode.
BUG=None
TEST=Cut off the battery. Plug in the charger and doesn't see green LED.
BRANCH=Spring
Change-Id: I079bcc19fcfff98a498cd9e3d2f99f0566b15fe4
Original-Change-Id: I14e6b3d32e04992bd8291da4b8b95e8e23a3acf0
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63459
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/64274
-rw-r--r-- | common/led_lp5562.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/common/led_lp5562.c b/common/led_lp5562.c index bf0c86321b..a35332be9b 100644 --- a/common/led_lp5562.c +++ b/common/led_lp5562.c @@ -150,14 +150,12 @@ static void battery_led_update(void) * set color here. */ switch (charge_get_state()) { - case ST_IDLE: - state = LED_STATE_SOLID_GREEN; - break; case ST_IDLE0: case ST_BAD_COND: case ST_PRE_CHARGING: state = LED_STATE_SOLID_YELLOW; break; + case ST_IDLE: case ST_DISCHARGING: case ST_CHARGING: if (battery_state_of_charge(&state_of_charge)) { |