diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2017-01-05 21:54:51 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-01-12 19:40:07 -0800 |
commit | ea5d8066b6c82cfc1d050e6e9803b99f3443f73b (patch) | |
tree | d05c97fd0c9d96edbb4fb330ac4ad75a6d21cbce /chip/g/system.c | |
parent | 65370849cb8391680bb451950948cd1369c80c7f (diff) | |
download | chrome-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 'chip/g/system.c')
-rw-r--r-- | chip/g/system.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chip/g/system.c b/chip/g/system.c index 8bc24040d1..ad553168c5 100644 --- a/chip/g/system.c +++ b/chip/g/system.c @@ -213,6 +213,15 @@ const char *system_get_chip_revision(void) return revision_str; } +int system_battery_cutoff_support_required(void) +{ + switch (get_fuse_set_id()) + case 0xc00059: + return 1; + + return 0; +} + /* TODO(crosbug.com/p/33822): Where can we store stuff persistently? */ int system_get_vbnvcontext(uint8_t *block) { |