summaryrefslogtreecommitdiff
path: root/include/battery.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-07-12 15:30:05 -0700
committerChromeBot <chrome-bot@google.com>2013-07-15 14:10:45 -0700
commit20e33095794d0a9957a3a0f768eb9560243c6063 (patch)
tree6df49c5110ae85f1855ce6bba5e305486b347fae /include/battery.h
parent1aab26540340085cba0fdd01d495cc3ae5e6d2a8 (diff)
downloadchrome-ec-20e33095794d0a9957a3a0f768eb9560243c6063.tar.gz
Remove fancy trickle charging logic
We implemented a fancy state machine for link to try and feed almost-dead batteries smaller amounts of current than the charger could normally supply, by dithering down the voltage to less than was requested. It's a lot simpler just to give the battery the smallest non-zero amount of current we can give it at the voltage it asks for. Remove the precharge code, since we won't use it on any future platform and link has already branched. BUG=chrome-os-partner:20881 BRANCH=none TEST=find a really dead batery and try to charge it, or do what I did and just hack the battery module to lie about the requested values, and see that it always gets the minimum current step at the requested voltage. Change-Id: I30bcb62bbe215abafb3a98c52e2afed3b74ead1a Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/61789
Diffstat (limited to 'include/battery.h')
-rw-r--r--include/battery.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/battery.h b/include/battery.h
index 50b4e53f7c..940187fe7f 100644
--- a/include/battery.h
+++ b/include/battery.h
@@ -10,19 +10,21 @@
/* Stop charge when charging and battery level >= this percentage */
#define BATTERY_LEVEL_FULL 100
+
/* Tell host we're charged when battery level >= this percentage */
#define BATTERY_LEVEL_NEAR_FULL 97
-/* Precharge only when charging and battery level < this level */
-#define BATTERY_LEVEL_PRE_CHARGE 25
+
/*
* Send battery-low host event when discharging and battery level <= this level
*/
#define BATTERY_LEVEL_LOW 10
+
/*
* Send battery-critical host event when discharging and battery level <= this
* level.
*/
#define BATTERY_LEVEL_CRITICAL 5
+
/*
* Shut down main processor and/or hibernate EC when discharging and battery
* level < this level.