diff options
author | Edward Hill <ecgh@chromium.org> | 2020-09-23 11:11:41 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-09-23 23:39:23 +0000 |
commit | da7a19ba2716dc4420caf8eb62c6f4e6f1bef4cc (patch) | |
tree | d4a32e12921b0711a2d61c6d745612292388932e /baseboard | |
parent | 54e4cbf51dd64f74d30a330ec5eb5df12c5c5948 (diff) | |
download | chrome-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 'baseboard')
-rw-r--r-- | baseboard/zork/baseboard.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/baseboard/zork/baseboard.c b/baseboard/zork/baseboard.c index ee9d9fbd9a..b067b66d10 100644 --- a/baseboard/zork/baseboard.c +++ b/baseboard/zork/baseboard.c @@ -362,3 +362,13 @@ int board_is_vbus_too_low(int port, enum chg_ramp_vbus_state ramp_state) return voltage < BC12_MIN_VOLTAGE; } + +/** + * Always ramp up input current since AP needs higher power, even if battery is + * very low or full. We can always re-ramp if input current increases beyond + * what supplier can provide. + */ +__override int charge_is_consuming_full_input_current(void) +{ + return 1; +} |