summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Green <evgreen@chromium.org>2021-07-28 10:00:37 -0700
committerCommit Bot <commit-bot@chromium.org>2021-08-20 23:03:13 +0000
commit5f4d5a9b38269af7633b097d82019a2fad48f1e9 (patch)
tree3dabdd3eba97b794d2cd678a7cbf249509a254d9
parent55b820a460814c6e96db114b10f3354a282d8a6d (diff)
downloadchrome-ec-5f4d5a9b38269af7633b097d82019a2fad48f1e9.tar.gz
test: Fix sbs_charging_v2's charge_control() cmd version
charge_control() was sending EC_CMD_CHARGE_CONTROL version 2, but leaving params.cmd uninitialized. Apparently we were just getting lucky. I did not get as lucky when compiling in 32-bit mode. This test is clearly sending the version 1 form of the command, so make the version number match the intent so the EC doesn't fail the command. BUG=b:179062230 BRANCH=none TEST=make -j runhosttests BOARD=host on x86_64 and i686 Signed-off-by: Evan Green <evgreen@chromium.org> Change-Id: Ie440ff825e1125bb50b4ac2477ba983e00ef303e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3059229 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3105741 Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
-rw-r--r--test/sbs_charging_v2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/sbs_charging_v2.c b/test/sbs_charging_v2.c
index 309624dd20..f8a425c5cd 100644
--- a/test/sbs_charging_v2.c
+++ b/test/sbs_charging_v2.c
@@ -112,7 +112,7 @@ static int charge_control(enum ec_charge_control_mode mode)
{
struct ec_params_charge_control params;
params.mode = mode;
- return test_send_host_command(EC_CMD_CHARGE_CONTROL, 2, &params,
+ return test_send_host_command(EC_CMD_CHARGE_CONTROL, 1, &params,
sizeof(params), NULL, 0);
}