summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2017-01-05 21:54:51 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-01-12 19:40:07 -0800
commitea5d8066b6c82cfc1d050e6e9803b99f3443f73b (patch)
treed05c97fd0c9d96edbb4fb330ac4ad75a6d21cbce /include
parent65370849cb8391680bb451950948cd1369c80c7f (diff)
downloadchrome-ec-ea5d8066b6c82cfc1d050e6e9803b99f3443f73b.tar.gz
cr50: help battery disconnect to work on detachable devices
Detachable devices need firmware help to process battery disconnect requests promptly. The request happens when the user keeps pressed both power and "volume up" buttons and yanks the charger cable. Once this condition is detected a 5 s timeout is started, and if the charger cable is not plugged back in during this interval, the code initiates a low polarity pulse on both EC_RST_L and BAT_EN outputs. Lowering BAT_EN level will cause the battery cut off which is supposed to cause an immediate system power down. BRANCH=none BUG=chrome-os-partner:59833 TEST=verified desired behavior on an H1 dev board with a H1B2-D chip. Change-Id: Iecdcc93e228f4bc18734569bd896b0afa4bb752a Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/426345 Reviewed-by: Marius Schilder <mschilder@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/system.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/system.h b/include/system.h
index 4df0fb1bad..1854e7373a 100644
--- a/include/system.h
+++ b/include/system.h
@@ -494,4 +494,11 @@ int system_rolling_reboot_suspected(void);
* @return a boolean, set to True if a rollback is detected.
*/
int system_rollback_detected(void);
+
+/**
+ * Returns non-zero value when firmware is expected to be abe to detect user
+ * request to cut off battery supply.
+ */
+int system_battery_cutoff_support_required(void);
+
#endif /* __CROS_EC_SYSTEM_H */