diff options
author | Ting Shen <phoenixshen@google.com> | 2019-10-17 11:21:14 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-10-18 09:13:47 +0000 |
commit | 4ee5cad3705b6f4f4de15030018a856a7b05710b (patch) | |
tree | f3a1232c9bc9cca43f9c0c0fc5f92b2f13753917 | |
parent | 5f3380d0a80dcedb6cb120b9e4c420b66b747a95 (diff) | |
download | chrome-ec-4ee5cad3705b6f4f4de15030018a856a7b05710b.tar.gz |
kukui: remove battery SoC overwrite hack
On-pack battery gauges should have better knowledge about battery life, so
maybe we can trust SoC value reported from gauge and don't need this
hack.
BUG=b:142097561
TEST=confirm battery SoC won't jump to 97% unexpectedly
BRANCH=kukui
Change-Id: Ie3efdcbfa6d6525040e68b5abe0345a4b6c1fcde
Signed-off-by: Ting Shen <phoenixshen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1866210
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
-rw-r--r-- | baseboard/kukui/charger_mt6370.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/baseboard/kukui/charger_mt6370.c b/baseboard/kukui/charger_mt6370.c index 0369ba9b8c..15ac3f3134 100644 --- a/baseboard/kukui/charger_mt6370.c +++ b/baseboard/kukui/charger_mt6370.c @@ -61,8 +61,10 @@ void mt6370_charger_profile_override(struct charge_state_data *curr) * SOC < BATTERY_LEVEL_NEAR_FULL, we'll overwrite SOC with * BATTERY_LEVEL_NEAR_FULL. So we can ensure both Chrome OS UI * and battery LED indicate full charge. + * + * Enable this hack on on-board gauge only (b/142097561) */ - if (rt946x_is_charge_done()) { + if (IS_ENABLED(CONFIG_BATTERY_MAX17055) && rt946x_is_charge_done()) { curr->batt.state_of_charge = MAX(BATTERY_LEVEL_NEAR_FULL, curr->batt.state_of_charge); } |