summaryrefslogtreecommitdiff
path: root/board/reef/battery.c
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2016-12-14 13:34:37 -0800
committerchrome-bot <chrome-bot@chromium.org>2016-12-20 03:25:57 -0800
commitd2ba32aa3fb8a96a6e38fff367b48ea301b1db23 (patch)
tree77eb66972e83ce3a28833151a4940425e7c72b60 /board/reef/battery.c
parentc0970e342754666ec87378aa40f18723aaff6f10 (diff)
downloadchrome-ec-d2ba32aa3fb8a96a6e38fff367b48ea301b1db23.tar.gz
charge_ramp: Fix OC detection on chargers which recover quickly
If VBUS is lost and then quickly recovers, we may detect the re-presence of the charger before charge_ramp has been informed about the loss. In this case, charge manager's supplier registration time will precede our ACTIVE_OC_INFO timestamp. Fix our timestamp comparison to correctly detect OC in this case. In addition, correctly mark all OC events stale once we have encountered a disconnect / reconnect that we determine not to be related to OC. BUG=chrome-os-partner:56367 TEST=Manual on reef, verify Motorola 800mA DCP charger settles at ~800mA after OC. BRANCH=reef Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: I3fdfd3929d07c60b82655999dd5aa731c1c7bc9b Reviewed-on: https://chromium-review.googlesource.com/419775 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> (cherry picked from commit 19ba4a053027486ca415c4d703944b38e3c5e652) Reviewed-on: https://chromium-review.googlesource.com/421208 Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com> Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'board/reef/battery.c')
0 files changed, 0 insertions, 0 deletions