diff options
author | Tim Van Patten <timvp@google.com> | 2022-12-20 15:20:50 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-01-10 03:10:30 +0000 |
commit | 933e9742f8d9899a8d749c12170f1b826cfcd88c (patch) | |
tree | 8a54b447ed36707798766917bdfd55c5a482277e /common | |
parent | 2366c6f0c8d71b107aa02fe43168f77c190ebc16 (diff) | |
download | chrome-ec-933e9742f8d9899a8d749c12170f1b826cfcd88c.tar.gz |
chargesplash: EC_CMD_CHARGESPLASH set response size
Set the response size for the host command EC_CMD_CHARGESPLASH. This
fixes a bug where the response size was not being set, so invalid data
was being returned to the caller in the AP.
BRANCH=none
BUG=b:228370390
TEST=Manually verify EC_CMD_CHARGESPLASH returns good data.
Change-Id: Ie4eec077a602e122623de34ced2f8ba06c5dcd6f
Signed-off-by: Tim Van Patten <timvp@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4118803
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/chargesplash.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/chargesplash.c b/common/chargesplash.c index c3d93cc47b..1c5187af76 100644 --- a/common/chargesplash.c +++ b/common/chargesplash.c @@ -37,6 +37,10 @@ static bool display_initialized; * True if the chargesplash is locked out, and we must wait until no * requests happen during the chargesplash period until the lockout can * be cleared. + * + * A charger can be locked out if it's too flaky, causing the charging status + * to bounce between enabled/disabled too many times within a specified + * time period. */ static bool locked_out; @@ -249,6 +253,8 @@ static enum ec_status chargesplash_host_cmd(struct host_cmd_handler_args *args) response->requested = power_on_for_chargesplash; response->display_initialized = display_initialized; response->locked_out = locked_out; + + args->response_size = sizeof(*response); return EC_RES_SUCCESS; } DECLARE_HOST_COMMAND(EC_CMD_CHARGESPLASH, chargesplash_host_cmd, |