Skip to content

Commit c9f3ab6

Browse files
dnojirikiram9
authored andcommitted
charge_state: Restore chargecontrol v1 for ectool
EC_CMD_CHARGE_CONTROL v1 is still used as a workaround for chargeoverride, which is not available on some boards. This CL reverts only the ectool support removed by crrev/c/4828144. BUG=b:278898714, b:299196526 TEST=None Change-Id: Iee1b1e29701f6fbb28f845704b69fb6a6670666a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4846121 Commit-Queue: Daisuke Nojiri <[email protected]> Reviewed-by: Derek Basehore <[email protected]> Tested-by: Daisuke Nojiri <[email protected]> Auto-Submit: Daisuke Nojiri <[email protected]> Code-Coverage: Zoss <[email protected]> Reviewed-by: Peter Marheine <[email protected]>
1 parent 9b6d19d commit c9f3ab6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

util/ectool.cc

+6-4
Original file line numberDiff line numberDiff line change
@@ -7677,10 +7677,12 @@ int cmd_charge_control(int argc, char *argv[])
76777677
}
76787678
version = 2;
76797679
} else {
7680-
fprintf(stderr,
7681-
"EC doesn't support V2+ of charge control command.\n"
7682-
"Consider firmware update.\n");
7683-
return -1;
7680+
if (argc != 2) {
7681+
cmd_charge_control_help(
7682+
argv[0], "Bad arguments or EC is too old");
7683+
return -1;
7684+
}
7685+
version = 1;
76847686
}
76857687

76867688
if (argc == 1) {

0 commit comments

Comments
 (0)