Philip Chen 163263c9a3 scarlet: Clamp reported battery SOC when charge terminates
After we set TE (CL:958295), rt946x terminates charging when
the charge current is below IEOC in constant-voltage mode.

When AC is plugged and rt946x terminates, we see cases that
battery SOC falls below BATTERY_LEVEL_NEAR_FULL but rt946x doesn't
re-enable charging yet, which leads to amber LED. The Chrome OS UI
might also show battery is not full in this case.

Let's clamp the reported battery SOC in this scenario to
avoid user confusion.

BUG=b:77870927
BRANCH=scarlet
TEST=When AC is on, charge terminates, and BATTERY_LEVEL_NEAR_FULL
is hit, confirm battery SOC is overwritten.

Change-Id: I4575e562873d149d6f349ddb578334d107e21776
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1055194
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
2018-05-14 23:56:58 -07:00
2017-08-07 19:29:13 -07:00
2018-05-14 15:32:47 -07:00
2017-07-08 20:38:53 -07:00
2017-10-10 22:13:43 -07:00
2018-05-02 22:20:48 -07:00
2012-05-11 09:11:52 -07:00
2018-05-14 12:28:05 -07:00
2018-05-14 12:28:05 -07:00
2014-04-02 19:58:53 +00:00
2018-05-02 22:21:09 -07:00
2017-11-16 21:07:40 -08:00

For an overview of the Embedded Controller firmware, refer to

http://www.chromium.org/chromium-os/2014-firmware-summit

For instructions on building from source, refer to

http://www.chromium.org/chromium-os/ec-development/getting-started-building-ec-images-quickly
Description
No description provided
Readme 1.4 GiB
Languages
C 64.7%
Lasso 20.7%
ASL 3.6%
JavaScript 3.2%
C# 2.9%
Other 4.6%