From 4232722401d59e8fcf0a8bd7902506945f1df835 Mon Sep 17 00:00:00 2001 From: Grzegorz Bernacki Date: Thu, 2 Feb 2023 11:32:17 +0000 Subject: host_cmd: Add command to get/set s0ix counter BUG=b:261869264 TEST=Tested on skyrim and nissa BRANCH=none Change-Id: I4f2cd0121b6eab445b9645037d607ae10daea835 Signed-off-by: Grzegorz Bernacki Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4239443 Reviewed-by: Robert Zieba --- include/ec_commands.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'include') diff --git a/include/ec_commands.h b/include/ec_commands.h index ecf499eb84..552dd1ca79 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -4983,6 +4983,23 @@ struct ec_response_device_event { uint32_t event_mask; } __ec_align4; +/*****************************************************************************/ +/* Get s0ix counter */ +#define EC_CMD_GET_S0IX_COUNTER 0x00AB + +/* Flag use to reset the counter */ +#define EC_S0IX_COUNTER_RESET 0x1 + +struct ec_params_s0ix_cnt { + /* If EC_S0IX_COUNTER_RESET then reset otherwise get the counter */ + uint32_t flags; +} __ec_align4; + +struct ec_response_s0ix_cnt { + /* Value of the s0ix_counter */ + uint32_t s0ix_counter; +} __ec_align4; + /*****************************************************************************/ /* Smart battery pass-through */ -- cgit v1.2.1