Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/73258 )
Change subject: ec/google/chromeec: Update ec_commands.h ......................................................................
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 --- M src/ec/google/chromeec/ec_commands.h 1 file changed, 46 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Caveh Jalali: Looks good to me, approved Raul Rangel: Looks good to me, approved
diff --git a/src/ec/google/chromeec/ec_commands.h b/src/ec/google/chromeec/ec_commands.h index 26c82ea..1066ccc 100644 --- a/src/ec/google/chromeec/ec_commands.h +++ b/src/ec/google/chromeec/ec_commands.h @@ -249,7 +249,9 @@ /* 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 @@ * 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 @@ "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 @@ * 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;
/*