summaryrefslogtreecommitdiff
path: root/test/sbs_charging_v2.c
diff options
context:
space:
mode:
authorDerek Basehore <dbasehore@google.com>2023-05-04 14:55:37 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-05-05 03:02:23 +0000
commitaeeadc2b31fa829b66c1e4366346d2dc81d03e76 (patch)
tree302e9fafdd44e6b7b3bed39f84241b73c14da550 /test/sbs_charging_v2.c
parent694075a660be40442a40aa20ef4aa99ca6481572 (diff)
downloadchrome-ec-aeeadc2b31fa829b66c1e4366346d2dc81d03e76.tar.gz
chgstv2: Always discharge if soc is > sustainer_soc.upper
For the Charge Limit feature, we need to discharge down to the upper limit for the battery sustainer. The Charge Limit feature requires that the system never charge above 80%, so if the feature is enabled when the system is over that, it needs to discharge down to 80%. BUG=b:222619859 TEST=run-sbs_charging_v2 Change-Id: I3f65743144de64411484dd3f2aa6c5fd681a47c9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4507756 Commit-Queue: Derek Basehore <dbasehore@chromium.org> Tested-by: Derek Basehore <dbasehore@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'test/sbs_charging_v2.c')
-rw-r--r--test/sbs_charging_v2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/sbs_charging_v2.c b/test/sbs_charging_v2.c
index 041f4f9a45..f47e349672 100644
--- a/test/sbs_charging_v2.c
+++ b/test/sbs_charging_v2.c
@@ -964,7 +964,7 @@ test_static int test_battery_sustainer_discharge_idle(void)
/* (lower =) upper < SoC */
display_soc = 810;
wait_charging_state();
- TEST_ASSERT(get_chg_ctrl_mode() == CHARGE_CONTROL_IDLE);
+ TEST_ASSERT(get_chg_ctrl_mode() == CHARGE_CONTROL_DISCHARGE);
/* Unplug AC. Sustainer gets deactivated. */
gpio_set_level(GPIO_AC_PRESENT, 0);
@@ -974,7 +974,7 @@ test_static int test_battery_sustainer_discharge_idle(void)
/* Replug AC. Sustainer gets re-activated. */
gpio_set_level(GPIO_AC_PRESENT, 1);
wait_charging_state();
- TEST_ASSERT(get_chg_ctrl_mode() == CHARGE_CONTROL_IDLE);
+ TEST_ASSERT(get_chg_ctrl_mode() == CHARGE_CONTROL_DISCHARGE);
/* lower = SoC = upper */
display_soc = 800;