diff options
author | Tim Van Patten <timvp@google.com> | 2023-02-24 12:27:04 -0700 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-02-27 16:41:30 +0000 |
commit | cab6060ed123899559788446b31b54e9d0fbcfa8 (patch) | |
tree | 9d9b2f8630ee45b0fe4de102cc18104c73e5a350 /src | |
parent | d712c628e7686d344698b8185f03e019bcee50ec (diff) |
ec/google/chromeec: Update ec_commands.h
Update ec_commands.h from the EC repo at:
"8441cf4 Add host event: EC_HOST_EVENT_BODY_DETECT_CHANGE"
This is an exact copy of the EC repo's ec_commands.h with the
exception of updating the copyright message.
BUG=b:261141172
BRANCH=none
TEST=built coreboot for skyrim
Change-Id: I9892c0c3518f63d357459861e8fa1b7f5f494e68
Signed-off-by: Tim Van Patten <timvp@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73258
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/ec/google/chromeec/ec_commands.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/ec/google/chromeec/ec_commands.h b/src/ec/google/chromeec/ec_commands.h index 26c82eab7d..1066cccce8 100644 --- a/src/ec/google/chromeec/ec_commands.h +++ b/src/ec/google/chromeec/ec_commands.h @@ -249,7 +249,9 @@ extern "C" { /* Report 0 for fan stalled so userspace applications can take * an appropriate action based on this value to control the fan. */ -#define EC_FAN_SPEED_STALLED 0x0 /* Fan stalled */ +#define EC_FAN_SPEED_STALLED 0x0 +/* This should be used only for ectool to support old ECs. */ +#define EC_FAN_SPEED_STALLED_DEPRECATED 0xfffe /* Battery bit flags at EC_MEMMAP_BATT_FLAG. */ #define EC_BATT_FLAG_AC_PRESENT 0x01 @@ -774,7 +776,16 @@ enum host_event_code { * not initialized on the EC, or improperly configured on the host. */ EC_HOST_EVENT_INVALID = 32, + + /* Body detect (lap/desk) change event */ + EC_HOST_EVENT_BODY_DETECT_CHANGE = 33, + + /* + * Only 64 host events are supported. This enum uses 1-based counting so + * it can skip 0 (NONE), so the last legal host event number is 64. + */ }; + /* Host event mask */ #define EC_HOST_EVENT_MASK(event_code) BIT_ULL((event_code)-1) @@ -815,6 +826,7 @@ enum host_event_code { "KEYBOARD_RECOVERY_HW_REINIT", \ [EC_HOST_EVENT_WOV] = "WOV", \ [EC_HOST_EVENT_INVALID] = "INVALID", \ + [EC_HOST_EVENT_BODY_DETECT_CHANGE] = "BODY_DETECT_CHANGE", \ } /* clang-format on */ @@ -4769,9 +4781,18 @@ struct ec_response_charge_state { * Set maximum battery charging current. */ #define EC_CMD_CHARGE_CURRENT_LIMIT 0x00A1 +#define EC_VER_CHARGE_CURRENT_LIMIT 1 struct ec_params_current_limit { uint32_t limit; /* in mA */ + + /* Added in v1 */ + /* + * Battery state of charge is the minimum charge percentage at which + * the battery charge current limit will apply. + * When not set, the limit will apply regardless of state of charge. + */ + uint8_t battery_soc; /* battery state of charge, 0-100 */ } __ec_align4; /* |