diff options
author | Aseda Aboagye <aaboagye@google.com> | 2018-07-26 19:05:04 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-07-31 16:37:10 -0700 |
commit | 4c4d4d3d0fedfd9c68133d245ef5af66a7e455eb (patch) | |
tree | 575a4dcf8d1c51f1c9a15f124b959c2a033d9f3c /common/charge_manager.c | |
parent | 0be219558010b9d00b8d45048046f7340d4fd086 (diff) | |
download | chrome-ec-4c4d4d3d0fedfd9c68133d245ef5af66a7e455eb.tar.gz |
chgstv2: Always check batt disconnect state.
When the battery is responsive, the charge state machine only checks the
disconnect state if the battery requests 0 volts and 0 milliamps. Since
battery disconnect state essentially means "can the battery provide a
charge?" we should always check the battery disconnect state. It's
possible that the battery wants a charge to recover from a short term
failure, but cannot yet provide charge to the system.
This commit simply changes battery_seems_to_be_disconnected to always
query the disconnect state regardless of the request charge voltage and
current.
BUG=b:76121712
BRANCH=None
TEST=Flash nocturne; cutoff battery, verify that battery is able to
recover and system is able to boot.
Change-Id: I91f9bdf2a54d4e16fc90c67264888342d87f9fe0
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1152554
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'common/charge_manager.c')
-rw-r--r-- | common/charge_manager.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/charge_manager.c b/common/charge_manager.c index 3d78d5874b..7ae0400262 100644 --- a/common/charge_manager.c +++ b/common/charge_manager.c @@ -904,6 +904,8 @@ void charge_manager_leave_safe_mode(void) if (left_safe_mode) return; + CPRINTS("%s()", __func__); + cflush(); left_safe_mode = 1; if (charge_manager_is_seeded()) hook_call_deferred(&charge_manager_refresh_data, 0); |