mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-14 16:46:23 +00:00
After we set TE (CL:958295), rt946x terminates charging when the charge current is below IEOC in constant-voltage mode. Let's add an interface to check charge termination status. BUG=b:77870927 BRANCH=scarlet TEST=charge scarlet, confirm rt946x_is_charge_done() returns 0 when battery is charging and returns 1 when charge terminates (battery is full). Then keep AC plugged and wait, confirm rt946x_is_charge_done() returns 0 when rt946x restarts charging. Change-Id: I559d328aa0d7c5c4cd5bf7178370ea039aa80204 Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/1044768 Commit-Ready: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>