Skip to content

Commit

Permalink
charge_state: Restore chargecontrol v1 for ectool
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
dnojiri authored and Terrails committed Dec 7, 2024
1 parent 5055a41 commit 45069e4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions util/ectool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7677,10 +7677,12 @@ int cmd_charge_control(int argc, char *argv[])
}
version = 2;
} else {
fprintf(stderr,
"EC doesn't support V2+ of charge control command.\n"
"Consider firmware update.\n");
return -1;
if (argc != 2) {
cmd_charge_control_help(
argv[0], "Bad arguments or EC is too old");
return -1;
}
version = 1;
}

if (argc == 1) {
Expand Down

0 comments on commit 45069e4

Please sign in to comment.