summaryrefslogtreecommitdiff
path: root/include/charge_state.h
diff options
context:
space:
mode:
authorTang Qijun <qijun.tang@ecs.corp-partner.google.com>2021-09-09 01:22:28 -0400
committerCommit Bot <commit-bot@chromium.org>2021-10-07 15:55:01 +0000
commit14891fcf8ac0ac2e1c72f5d22321c6b077ab2e53 (patch)
tree3a9987bf6d407e70f8918e47dfe99bc50b02266f /include/charge_state.h
parent234e646fd807dc60f9af78c80db3edf8d5f93cee (diff)
downloadchrome-ec-14891fcf8ac0ac2e1c72f5d22321c6b077ab2e53.tar.gz
chgstv2: Implement battery protection for low voltage
Deep charge inspection is a battery protection mechanism: If battery voltage is lower than 6V, deep charge for more than 30 minutes The battery voltage is still lower than 6V, the system will stop charging BRANCH=trogdor BUG=b:198226241 TEST=run-sbs_charging_v2 Signed-off-by: Tang Qijun <qijun.tang@ecs.corp-partner.google.com> Change-Id: I89adf7809992b9e71b232ad1129af1407acf05a2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3151037 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'include/charge_state.h')
-rw-r--r--include/charge_state.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/charge_state.h b/include/charge_state.h
index 0ab7ecd686..9349c3ea4c 100644
--- a/include/charge_state.h
+++ b/include/charge_state.h
@@ -82,6 +82,11 @@ enum charge_state {
enum charge_state charge_get_state(void);
/**
+ * Return current charge v2 state.
+ */
+__test_only enum charge_state_v2 charge_get_state_v2(void);
+
+/**
* Return non-zero if battery is so low we want to keep AP off.
*/
int charge_keep_power_off(void);