diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-02-28 13:56:02 -0800 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-03-05 10:26:21 -0800 |
commit | 6971fd7a7f8a2351f011bdd60eabda664e0c3ba2 (patch) | |
tree | 2f27d93673a1846010d5be5af665c41d6041fafd /include | |
parent | 70cdf52ea1aec0681372a21bc41308a1e4ad20e4 (diff) | |
download | chrome-ec-6971fd7a7f8a2351f011bdd60eabda664e0c3ba2.tar.gz |
After shutting down AP, hibernate EC if battery is low
This preserves more battery for the real-time clock. It also gets rid
of one battery level/state, since the EC will now shut down at the
same level (2%) as the AP.
Having the EC hibernate at the same level as the AP shuts down also
prevents the following weird scenario:
- EC powers on at 2% battery.
- EC won't power on the AP to do software sync because battery is low.
- But the charge state machine won't actually hibernate the EC until 1%.
- Between 2% and 1%, AC is inserted and system starts charging.
- But EC-RO is what's doing the charging; we should go through software sync
before charging.
BUG=chrome-os-partner:17124
BRANCH=link
TEST=manual
On battery power,
1) With system on, battfake 2 -> system shuts down and EC hibernates
2) With system off, battfake 2 -> EC hibernates
Change-Id: I87d17f70d60673f3e3f1c6eb88f3f00a8c9ed4e7
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/44314
Diffstat (limited to 'include')
-rw-r--r-- | include/battery.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/battery.h b/include/battery.h index da4071e158..50b4e53f7c 100644 --- a/include/battery.h +++ b/include/battery.h @@ -23,10 +23,11 @@ * level. */ #define BATTERY_LEVEL_CRITICAL 5 -/* Shut down main processor when discharging and battery level < this level */ +/* + * Shut down main processor and/or hibernate EC when discharging and battery + * level < this level. + */ #define BATTERY_LEVEL_SHUTDOWN 3 -/* Hibernate EC immediately when discharging and battery level < this level */ -#define BATTERY_LEVEL_HIBERNATE_EC 2 #endif /* __CROS_EC_BATTERY_H */ |