From e541ebdc9521450ee9ee3fed471cb764786d705c Mon Sep 17 00:00:00 2001 From: Zhuohao Lee Date: Sat, 3 Jul 2021 00:21:11 +0800 Subject: ectool: fixup the error for chargecontrol normal|idle|discharge We added the EC_CHARGE_CONTROL_CMD_SET and EC_CHARGE_CONTROL_CMD_GET in the http://crrev/c/2929340. However, the ectool missed to set the p.cmd to EC_CHARGE_CONTROL_CMD_SET before calling the host command. This patch adds the p.cmd to fix it. BUG=b:183679223 BRANCH=main TEST=`ectool chargecontrol normal|idle|discharge` is working Change-Id: I6e07801bb9e39f67165cb18a237c459b98c6d356 Signed-off-by: Zhuohao Lee Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3003003 Reviewed-by: Daisuke Nojiri --- util/ectool.c | 1 + 1 file changed, 1 insertion(+) (limited to 'util/ectool.c') diff --git a/util/ectool.c b/util/ectool.c index c652bdbe18..a8be48fc35 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -7576,6 +7576,7 @@ int cmd_charge_control(int argc, char *argv[]) return 0; } + p.cmd = EC_CHARGE_CONTROL_CMD_SET; if (!strcasecmp(argv[1], "normal")) { p.mode = CHARGE_CONTROL_NORMAL; if (argc == 2) { -- cgit v1.2.1