diff options
author | Randall Spangler <rspangler@chromium.org> | 2012-10-05 11:09:49 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-10-05 15:21:18 -0700 |
commit | fcd0f0a5e485653d40d6409802d1a26c4595d605 (patch) | |
tree | 23f21be15ea4826c19efdb258e60b832f7494396 /include/battery.h | |
parent | 1173102ae1974a7e96dce4e1d03db54817c3113e (diff) | |
download | chrome-ec-fcd0f0a5e485653d40d6409802d1a26c4595d605.tar.gz |
link: Hibernate EC when battery level drops below 2%
We already shut down the main processor below 3%. Hibernating the EC
below 2% will further cut power draw and minimize the risk of
deep-discharging the battery.
BUG=chrome-os-partner:14839
BRANCH=link
TEST=manual
1) discharge battery below 3%; system should shut down. when powered
on again it should shut back down within ~10 sec.
2) discharge battery below 2%; when system shuts down it should also hibernate.
(I've also tested this with a hacked smart_battery.c which lies about
the battery state of charge, since that's faster than waiting for my
battery to discharge.)
Change-Id: I504ba927012430db5cf10b895a36e6cd6fdf4c8b
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/34793
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'include/battery.h')
-rw-r--r-- | include/battery.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/battery.h b/include/battery.h index 02001b763a..c09e4eb76b 100644 --- a/include/battery.h +++ b/include/battery.h @@ -12,7 +12,10 @@ #define BATTERY_LEVEL_WARNING 15 #define BATTERY_LEVEL_LOW 10 #define BATTERY_LEVEL_CRITICAL 5 +/* Shut down main processor when battery level reaches this level */ #define BATTERY_LEVEL_SHUTDOWN 3 +/* Hibernate EC immediately when battery level reaches this level */ +#define BATTERY_LEVEL_HIBERNATE_EC 2 /* Stop charge when state of charge reaches this percentage */ #define STOP_CHARGE_THRESHOLD 100 |