summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Basehore <dbasehore@chromium.org>2013-09-11 13:01:02 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-09-12 18:04:29 +0000
commit918b2dde3a85b952356580040dbfc611204fae2a (patch)
tree36498625d5b775feafeff7bf88871bc324b9fa3d
parentb28e92a855ea43b9003dd9bae73fefe3c304fd53 (diff)
downloadchrome-ec-918b2dde3a85b952356580040dbfc611204fae2a.tar.gz
pit: Change battery level warning and shutdown levels
This causes the EC to give a warning when the battery is less than 3.5% and shutdown when the batteyr is less than 1.5% BUG=chrome-os-partner:21926 TEST=check that warning happens at < 3.5% and shutdown happens at < 1.5% on the EC console. Change-Id: I1bd06f632e969b55bbb041c65ab106ef764e454b Signed-off-by: Derek Basehore <dbasehore@chromium.org> (cherry picked from commit 2f93978e5e5dcf841ef24fa6b9ba2fa9459d3d98) (cherry picked from commit 447d69abcb3c61440d89b4aac8c4472a35b3b77d) Reviewed-on: https://chromium-review.googlesource.com/169055 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--common/pmu_tps65090_charger.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/pmu_tps65090_charger.c b/common/pmu_tps65090_charger.c
index fcaf24609c..0e80809afe 100644
--- a/common/pmu_tps65090_charger.c
+++ b/common/pmu_tps65090_charger.c
@@ -104,7 +104,7 @@ static int notify_battery_low(void)
if (chipset_in_state(CHIPSET_STATE_ON)) {
now = get_time();
if (now.val - last_notify_time.val > MINUTE) {
- CPUTS("[pmu] notify battery low (< 10%)\n");
+ CPUTS("[pmu] notify battery low (< 4%)\n");
last_notify_time = now;
/* TODO(rongchang): notify AP ? */
}
@@ -350,12 +350,12 @@ static int calc_next_state(int state)
/* Check remaining charge % */
if (battery_state_of_charge(&capacity) == 0) {
/*
- * Shutdown AP when state of charge < 2.5%.
+ * Shutdown AP when state of charge < 1.5%.
* Moving average is rounded to integer.
*/
- if (rsoc_moving_average(capacity) < 3) {
+ if (rsoc_moving_average(capacity) < 2) {
return system_off();
- } else if (capacity < 10) {
+ } else if (capacity < 4) {
notify_battery_low();
}
}