diff options
author | Randall Spangler <rspangler@chromium.org> | 2012-10-01 15:19:29 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-10-01 23:50:16 -0700 |
commit | 56ce828309b2c7a15d032bd47b3deac39c7715ab (patch) | |
tree | e6e992196e00bcb4daa29602e72b2fc5b57e8084 /include/charge_state.h | |
parent | bb66bec788c9447976d1be56f69a40b6c1ea36a3 (diff) | |
download | chrome-ec-56ce828309b2c7a15d032bd47b3deac39c7715ab.tar.gz |
link: Don't set power LED green until second idle
Currently, the charge state machine sets the power LED green the first
time it hits IDLE. This causes the LED to briefly flash green when
the adapter is inserted, because the state machine goes
discharging->init->idle->charging.
Instead, add a new idle0 state in between init and idle which does not
set the power LED. This allows the state machine to go
discharging->init->idle0->charging, so the LED only goes from off->yellow.
If the system is actually fully charged, it'll go init->idle0->idle
and show green.
BUG=chrome-os-partner:14630
BRANCH=link
TEST=manual
- Remove adapter and allow system to discharge a bit
- Insert adapter
- Should see LED go from off directly to yellow
- Wait for charge
- Should see LED go green
Change-Id: I9b77f01fad27c8574133211c9fe250486609f3c1
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/34387
Reviewed-by: Rong Chang <rongchang@chromium.org>
Diffstat (limited to 'include/charge_state.h')
-rw-r--r-- | include/charge_state.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/charge_state.h b/include/charge_state.h index 4810a01c50..9b4e6d364f 100644 --- a/include/charge_state.h +++ b/include/charge_state.h @@ -50,6 +50,7 @@ enum power_state { PWR_STATE_UNCHANGE = 0, PWR_STATE_INIT, + PWR_STATE_IDLE0, PWR_STATE_IDLE, PWR_STATE_DISCHARGE, PWR_STATE_CHARGE, @@ -63,6 +64,7 @@ enum power_state { { \ "unchange", \ "init", \ + "idle0", \ "idle", \ "discharge", \ "charge", \ |