diff options
author | Vic Yang <victoryang@chromium.org> | 2014-10-08 08:57:24 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-10-09 23:29:34 +0000 |
commit | e3e799916460fc2faf3c661534de014d692e7f19 (patch) | |
tree | 98d6f93d7065a9107f819e67dc517e4c8a65d91b /common/charge_state_v2.c | |
parent | 61dc089e23091a337a49f062d9058741a0ebf3bd (diff) | |
download | chrome-ec-e3e799916460fc2faf3c661534de014d692e7f19.tar.gz |
Don't hibernate on low battery if hiberante is not supported
If CONFIG_HIBERNATE is explicitly undefined for a board, the EC
shouldn't hibernate when the battery is running low. Otherwise, the EC
reboots because of the lack of hibernate support, and this actually
burns more power.
BUG=chrome-os-partner:32727, chrome-os-partner:32779
TEST=Drain the battery to 2% and verify the EC is behaving.
BRANCH=None
Change-Id: I2f9f5fd8fb4b5be4d8da113da4ef26c062869a07
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/222615
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'common/charge_state_v2.c')
-rw-r--r-- | common/charge_state_v2.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/charge_state_v2.c b/common/charge_state_v2.c index 2c17a838bf..a5d421c45b 100644 --- a/common/charge_state_v2.c +++ b/common/charge_state_v2.c @@ -418,9 +418,11 @@ static void prevent_deep_discharge(void) return; if (chipset_in_state(CHIPSET_STATE_ANY_OFF)) { +#ifdef CONFIG_HIBERNATE /* AP is off, so shut down the EC now */ CPRINTS("charge force EC hibernate due to low battery"); system_hibernate(0, 0); +#endif } else if (!shutdown_warning_time.val) { /* Warn AP battery level is so low we'll shut down */ CPRINTS("charge warn shutdown due to low battery"); |