Files
OpenCellular/common
Philip Chen bf62593ebd charge_state_v2: Throttle AP in high battery discharge current
When EC sees discharge current hit BAT_MAX_DISCHG_CURRENT,
we kick off a timer and ask AP to throttle.

Then EC keeps monitoring discharge current. If the current doesn't
drop below BAT_MAX_DISCHG_CURRENT - BAT_OCP_HYSTERESIS, we restart
the timer and notify AP again, which shouldn't happen unless
AP misses or ignores the first notification.

When the timer expires, which means EC hasn't seen over-current
for BAT_OCP_TIMEOUT_US, we ask AP to stop throttling.

BUG=b:74321682, chromium:838754
BRANCH=scarlet
TEST=manually test on scarlet, confirm EC sends
EC_HOST_EVENT_THROTTLE_START and EC_HOST_EVENT_THROTTLE_STOP
host events when entering/exiting OCP.

Change-Id: I1e55fc23249596d8afec52a3885655ca9c1f2151
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/994188
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
2018-05-10 19:41:04 -07:00
..
2017-12-28 14:50:29 -08:00
2018-04-10 19:13:11 -07:00
2018-04-03 18:47:12 -07:00
2015-05-19 02:46:27 +00:00
2018-05-09 22:36:19 -07:00
2018-01-10 12:58:55 -08:00
2016-11-15 17:41:53 -08:00
2017-12-28 12:35:08 -08:00
2017-09-11 11:14:24 -07:00
2016-03-02 13:39:47 -08:00
2017-06-02 10:38:57 -07:00
2017-10-31 13:04:59 -07:00
2018-03-20 19:30:06 -07:00
2014-05-17 20:14:17 +00:00
2018-03-01 12:39:05 -08:00
2016-03-21 16:35:33 -07:00
2017-05-09 23:20:07 -07:00
2017-11-06 13:48:38 -08:00
2017-08-10 22:47:24 -07:00
2018-04-11 04:39:07 -07:00
2018-05-09 14:40:02 -07:00
2017-12-18 20:32:58 -08:00
2017-12-18 20:32:58 -08:00
2018-03-20 19:30:17 -07:00
2017-09-22 10:18:50 -07:00