diff options
author | Zhuohao Lee <zhuohao@chromium.org> | 2021-07-03 00:21:11 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-02 18:18:38 +0000 |
commit | e541ebdc9521450ee9ee3fed471cb764786d705c (patch) | |
tree | 6a26caac8165bbac4a35e4a542758ddb56e4aded /util/ectool.c | |
parent | 079a1c9fedbf1a3c4fa8c650a475e198e29b1d6f (diff) | |
download | chrome-ec-e541ebdc9521450ee9ee3fed471cb764786d705c.tar.gz |
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 <zhuohao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3003003
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'util/ectool.c')
-rw-r--r-- | util/ectool.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) { |