diff options
author | Louis Yung-Chieh Lo <yjlou@chromium.org> | 2014-04-22 16:34:12 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-04-23 20:50:48 +0000 |
commit | fcf26a43ab1737acc873afcc1b61b4fb20389966 (patch) | |
tree | 9215d25bcf79683b9c996941410e2911d06ef3ac /common/battery.c | |
parent | 3b36337be1e165db491bc591ae95be3577886465 (diff) | |
download | chrome-ec-fcf26a43ab1737acc873afcc1b61b4fb20389966.tar.gz |
charger v2: supports charger watchdog
Some chargers support a timeout mechanism that it would stop charging
if no voltage/current setting comes from battery or EC. This is designed
for safety.
In charger v1, it always updates charger periodically. But in v2, old code
only updates charger when needed. New code updates the charger periodically.
Also keep the ability for debugging. A manual mode is introduced so that
any requested volt/curr from host and force idle mode request would trigger
this mode. To leave this mode, just disable the force idle mode.
BUG=chrome-os-partner:28201,chrome-os-partner:28208
BRANCH=nyan
TEST=See below.
Plug AC and battery. Wait for 10 mins and the battery is charged normally.
'chgstate idle on': the charger doesn't charge the battery.
'chgstate idle off': charge again.
Plug in AC and remove battery: No annoying repeated message and works fine.
Plug in battery and remove AC: No annoying repeated message and works fine.
Power up machine with battery only: No annoying repeated message and works fine.
Power up machine with AC only: No annoying repeated message and works fine.
Change-Id: I00d62f8afa2fe2627ea9259f11679ced02af897a
Signed-off-by: Louis Yung-Chieh Lo <yjlou@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/196385
Diffstat (limited to 'common/battery.c')
0 files changed, 0 insertions, 0 deletions