summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorEdward Hill <ecgh@chromium.org>2020-09-23 11:11:41 -0600
committerCommit Bot <commit-bot@chromium.org>2020-09-23 23:39:23 +0000
commitda7a19ba2716dc4420caf8eb62c6f4e6f1bef4cc (patch)
treed4a32e12921b0711a2d61c6d745612292388932e /common
parent54e4cbf51dd64f74d30a330ec5eb5df12c5c5948 (diff)
downloadchrome-ec-da7a19ba2716dc4420caf8eb62c6f4e6f1bef4cc.tar.gz
zork: Ignore input current and always ramp
CONFIG_CHARGE_RAMP_SW is designed to stop ramping if we are not using enough current (so we are actually testing that the supplier can give the current we ramp to). But this is checked using charge_is_consuming_full_input_current(), which only tests for battery charge between 2% and 95%. This fails to accurately reflect desire for input current, because the low battery might want to charge faster, and the AP might want extra power even with full battery. For zork, change charge_is_consuming_full_input_current() to always return true. This means we will always ramp. If we are not using the full input current, and the supplier cannot deliver it when we do, then we will detect the voltage drop and re-ramp, which seems fine. BUG=b:168569046 BRANCH=zork TEST=ramp with full battery Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: Ic7c9b93bdd3856c9b05bd3a13e8c2a78aa883755 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2426950 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/charge_state_v2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/charge_state_v2.c b/common/charge_state_v2.c
index 1d5fc48a02..7d6001bf4f 100644
--- a/common/charge_state_v2.c
+++ b/common/charge_state_v2.c
@@ -2389,7 +2389,7 @@ int charge_get_battery_temp(int idx, int *temp_ptr)
return EC_SUCCESS;
}
-int charge_is_consuming_full_input_current(void)
+__overridable int charge_is_consuming_full_input_current(void)
{
int chg_pct = charge_get_percent();