ec/google/chromeec: clang-format ec_commands.h
This is a format-only change: Reformat ec_commands.h using clang-format according to the EC repo's current formatting style. The command is: clang-format --style=file:$EC/.clang-format -i ec_commands.h where $EC points to the chromeos EC repo. The EC repo has recently adpoted the practice of formatting all files through clang-format using its own style. So, run ec_commands.h through the EC's clang-format so future updates don't get overwhelmed by inconsequential style changes. BUG=b:258110734 BRANCH=none TEST=built coreboot for brya Change-Id: Icbd6d00922dc5fd4c44ee109d54cea612e15db06 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/72639 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
@@ -93,8 +93,9 @@ extern "C" {
|
||||
/* I/O addresses for host command args and params */
|
||||
/* Protocol version 2 */
|
||||
#define EC_LPC_ADDR_HOST_ARGS 0x800 /* And 0x801, 0x802, 0x803 */
|
||||
#define EC_LPC_ADDR_HOST_PARAM 0x804 /* For version 2 params; size is
|
||||
* EC_PROTO2_MAX_PARAM_SIZE
|
||||
#define EC_LPC_ADDR_HOST_PARAM \
|
||||
0x804 /* For version 2 params; size is \
|
||||
* EC_PROTO2_MAX_PARAM_SIZE \
|
||||
*/
|
||||
/* Protocol version 3 */
|
||||
#define EC_LPC_ADDR_HOST_PACKET 0x800 /* Offset of version 3 packet */
|
||||
@@ -190,8 +191,8 @@ extern "C" {
|
||||
#define EC_TEMP_SENSOR_B_ENTRIES 8
|
||||
|
||||
/* Max temp sensor entries for host commands */
|
||||
#define EC_MAX_TEMP_SENSOR_ENTRIES (EC_TEMP_SENSOR_ENTRIES + \
|
||||
EC_TEMP_SENSOR_B_ENTRIES)
|
||||
#define EC_MAX_TEMP_SENSOR_ENTRIES \
|
||||
(EC_TEMP_SENSOR_ENTRIES + EC_TEMP_SENSOR_B_ENTRIES)
|
||||
|
||||
/* Special values for mapped temperature sensors */
|
||||
#define EC_TEMP_SENSOR_NOT_PRESENT 0xff
|
||||
@@ -461,10 +462,9 @@ extern "C" {
|
||||
#define USB_RETIMER_FW_UPDATE_ERR 0xfe
|
||||
#define USB_RETIMER_FW_UPDATE_INVALID_MUX 0xff
|
||||
/* Mask to clear unused MUX bits in retimer firmware update */
|
||||
#define USB_RETIMER_FW_UPDATE_MUX_MASK (USB_PD_MUX_USB_ENABLED | \
|
||||
USB_PD_MUX_DP_ENABLED | \
|
||||
USB_PD_MUX_SAFE_MODE | \
|
||||
USB_PD_MUX_TBT_COMPAT_ENABLED | \
|
||||
#define USB_RETIMER_FW_UPDATE_MUX_MASK \
|
||||
(USB_PD_MUX_USB_ENABLED | USB_PD_MUX_DP_ENABLED | \
|
||||
USB_PD_MUX_SAFE_MODE | USB_PD_MUX_TBT_COMPAT_ENABLED | \
|
||||
USB_PD_MUX_USB4_ENABLED)
|
||||
|
||||
/* Retimer firmware update operations */
|
||||
@@ -491,7 +491,6 @@ extern "C" {
|
||||
/* Current version of ACPI memory address space */
|
||||
#define EC_ACPI_MEM_VERSION_CURRENT 2
|
||||
|
||||
|
||||
/*
|
||||
* This header file is used in coreboot both in C and ACPI code. The ACPI code
|
||||
* is pre-processed to handle constants but the ASL compiler is unable to
|
||||
@@ -885,22 +884,22 @@ struct ec_lpc_host_args {
|
||||
*/
|
||||
#define EC_PROTO2_REQUEST_HEADER_BYTES 3
|
||||
#define EC_PROTO2_REQUEST_TRAILER_BYTES 1
|
||||
#define EC_PROTO2_REQUEST_OVERHEAD (EC_PROTO2_REQUEST_HEADER_BYTES + \
|
||||
EC_PROTO2_REQUEST_TRAILER_BYTES)
|
||||
#define EC_PROTO2_REQUEST_OVERHEAD \
|
||||
(EC_PROTO2_REQUEST_HEADER_BYTES + EC_PROTO2_REQUEST_TRAILER_BYTES)
|
||||
|
||||
#define EC_PROTO2_RESPONSE_HEADER_BYTES 2
|
||||
#define EC_PROTO2_RESPONSE_TRAILER_BYTES 1
|
||||
#define EC_PROTO2_RESPONSE_OVERHEAD (EC_PROTO2_RESPONSE_HEADER_BYTES + \
|
||||
EC_PROTO2_RESPONSE_TRAILER_BYTES)
|
||||
#define EC_PROTO2_RESPONSE_OVERHEAD \
|
||||
(EC_PROTO2_RESPONSE_HEADER_BYTES + EC_PROTO2_RESPONSE_TRAILER_BYTES)
|
||||
|
||||
/* Parameter length was limited by the LPC interface */
|
||||
#define EC_PROTO2_MAX_PARAM_SIZE 0xfc
|
||||
|
||||
/* Maximum request and response packet sizes for protocol version 2 */
|
||||
#define EC_PROTO2_MAX_REQUEST_SIZE (EC_PROTO2_REQUEST_OVERHEAD + \
|
||||
EC_PROTO2_MAX_PARAM_SIZE)
|
||||
#define EC_PROTO2_MAX_RESPONSE_SIZE (EC_PROTO2_RESPONSE_OVERHEAD + \
|
||||
EC_PROTO2_MAX_PARAM_SIZE)
|
||||
#define EC_PROTO2_MAX_REQUEST_SIZE \
|
||||
(EC_PROTO2_REQUEST_OVERHEAD + EC_PROTO2_MAX_PARAM_SIZE)
|
||||
#define EC_PROTO2_MAX_RESPONSE_SIZE \
|
||||
(EC_PROTO2_RESPONSE_OVERHEAD + EC_PROTO2_MAX_PARAM_SIZE)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
@@ -1356,7 +1355,6 @@ struct ec_response_get_protocol_info {
|
||||
uint32_t flags;
|
||||
} __ec_align4;
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Get/Set miscellaneous values */
|
||||
|
||||
@@ -1788,7 +1786,6 @@ struct ec_params_flash_erase_v1 {
|
||||
/* Error - Unknown error */
|
||||
#define EC_FLASH_PROTECT_ERROR_UNKNOWN BIT(11)
|
||||
|
||||
|
||||
/**
|
||||
* struct ec_params_flash_protect - Parameters for the flash protect command.
|
||||
* @mask: Bits in flags to apply.
|
||||
@@ -1883,7 +1880,6 @@ struct ec_response_flash_spi_info {
|
||||
uint8_t sr1, sr2;
|
||||
} __ec_align1;
|
||||
|
||||
|
||||
/* Select flash during flash operations */
|
||||
#define EC_CMD_FLASH_SELECT 0x0019
|
||||
|
||||
@@ -1895,7 +1891,6 @@ struct ec_params_flash_select {
|
||||
uint8_t select;
|
||||
} __ec_align4;
|
||||
|
||||
|
||||
/**
|
||||
* Request random numbers to be generated and returned.
|
||||
* Can be used to test the random number generator is truly random.
|
||||
@@ -2312,7 +2307,6 @@ struct ec_response_lightbar {
|
||||
struct lightbar_params_v0 get_params_v0;
|
||||
struct lightbar_params_v1 get_params_v1;
|
||||
|
||||
|
||||
struct lightbar_params_v2_timing get_params_v2_timing;
|
||||
struct lightbar_params_v2_tap get_params_v2_tap;
|
||||
struct lightbar_params_v2_oscillation get_params_v2_osc;
|
||||
@@ -2947,7 +2941,6 @@ struct ec_params_motion_sense {
|
||||
uint16_t scale[3];
|
||||
} sensor_scale;
|
||||
|
||||
|
||||
/* Used for MOTIONSENSE_CMD_FIFO_INFO */
|
||||
/* (no params) */
|
||||
|
||||
@@ -3427,7 +3420,6 @@ struct ec_response_thermal_get_threshold {
|
||||
uint16_t value;
|
||||
} __ec_align2;
|
||||
|
||||
|
||||
/* The version 1 structs are visible. */
|
||||
enum ec_temp_thresholds {
|
||||
EC_TEMP_THRESH_WARN = 0,
|
||||
@@ -3543,7 +3535,6 @@ struct ec_params_tmp006_set_calibration_v1 {
|
||||
float val[0];
|
||||
} __ec_align4;
|
||||
|
||||
|
||||
/* Read raw TMP006 data */
|
||||
#define EC_CMD_TMP006_GET_RAW 0x0055
|
||||
|
||||
@@ -3916,12 +3907,12 @@ struct ec_response_keyboard_factory_test {
|
||||
#define EC_MKBP_FP_RAW_EVENT(fp_events) ((fp_events)&0x00FFFFFF)
|
||||
#define EC_MKBP_FP_ERRCODE(fp_events) ((fp_events)&0x0000000F)
|
||||
#define EC_MKBP_FP_ENROLL_PROGRESS_OFFSET 4
|
||||
#define EC_MKBP_FP_ENROLL_PROGRESS(fpe) (((fpe) & 0x00000FF0) \
|
||||
>> EC_MKBP_FP_ENROLL_PROGRESS_OFFSET)
|
||||
#define EC_MKBP_FP_ENROLL_PROGRESS(fpe) \
|
||||
(((fpe)&0x00000FF0) >> EC_MKBP_FP_ENROLL_PROGRESS_OFFSET)
|
||||
#define EC_MKBP_FP_MATCH_IDX_OFFSET 12
|
||||
#define EC_MKBP_FP_MATCH_IDX_MASK 0x0000F000
|
||||
#define EC_MKBP_FP_MATCH_IDX(fpe) (((fpe) & EC_MKBP_FP_MATCH_IDX_MASK) \
|
||||
>> EC_MKBP_FP_MATCH_IDX_OFFSET)
|
||||
#define EC_MKBP_FP_MATCH_IDX(fpe) \
|
||||
(((fpe)&EC_MKBP_FP_MATCH_IDX_MASK) >> EC_MKBP_FP_MATCH_IDX_OFFSET)
|
||||
#define EC_MKBP_FP_ENROLL BIT(27)
|
||||
#define EC_MKBP_FP_MATCH BIT(28)
|
||||
#define EC_MKBP_FP_FINGER_DOWN BIT(29)
|
||||
@@ -3945,7 +3936,6 @@ struct ec_response_keyboard_factory_test {
|
||||
#define EC_MKBP_FP_ERR_MATCH_YES_UPDATED 3
|
||||
#define EC_MKBP_FP_ERR_MATCH_YES_UPDATE_FAILED 5
|
||||
|
||||
|
||||
#define EC_CMD_MKBP_WAKE_MASK 0x0069
|
||||
enum ec_mkbp_event_mask_action {
|
||||
/* Retrieve the value of a wake mask. */
|
||||
@@ -4023,7 +4013,6 @@ struct ec_response_temp_sensor_get_info {
|
||||
/*****************************************************************************/
|
||||
/* Host event commands */
|
||||
|
||||
|
||||
/* Obsolete. New implementation should use EC_CMD_HOST_EVENT instead */
|
||||
/*
|
||||
* Host event mask params and response structures, shared by all of the host
|
||||
@@ -4060,7 +4049,6 @@ struct ec_response_host_event_mask {
|
||||
*/
|
||||
|
||||
struct ec_params_host_event {
|
||||
|
||||
/* Action requested by host - one of enum ec_host_event_action. */
|
||||
uint8_t action;
|
||||
|
||||
@@ -4083,7 +4071,6 @@ struct ec_params_host_event {
|
||||
*/
|
||||
|
||||
struct ec_response_host_event {
|
||||
|
||||
/* Mask value in case of get operation */
|
||||
uint64_t value;
|
||||
} __ec_align4;
|
||||
@@ -4288,7 +4275,8 @@ enum ec_charge_control_mode {
|
||||
CHARGE_CONTROL_COUNT,
|
||||
};
|
||||
|
||||
#define EC_CHARGE_MODE_TEXT { \
|
||||
#define EC_CHARGE_MODE_TEXT \
|
||||
{ \
|
||||
[CHARGE_CONTROL_NORMAL] = "NORMAL", \
|
||||
[CHARGE_CONTROL_IDLE] = "IDLE", \
|
||||
[CHARGE_CONTROL_DISCHARGE] = "DISCHARGE", \
|
||||
@@ -4348,10 +4336,7 @@ struct ec_response_charge_control {
|
||||
*/
|
||||
#define EC_CMD_CONSOLE_READ 0x0098
|
||||
|
||||
enum ec_console_read_subcmd {
|
||||
CONSOLE_READ_NEXT = 0,
|
||||
CONSOLE_READ_RECENT
|
||||
};
|
||||
enum ec_console_read_subcmd { CONSOLE_READ_NEXT = 0, CONSOLE_READ_RECENT };
|
||||
|
||||
struct ec_params_console_read_v1 {
|
||||
uint8_t subcmd; /* enum ec_console_read_subcmd */
|
||||
@@ -4664,7 +4649,6 @@ struct ec_response_charge_state {
|
||||
};
|
||||
} __ec_align4;
|
||||
|
||||
|
||||
/*
|
||||
* Set maximum battery charging current.
|
||||
*/
|
||||
@@ -5027,7 +5011,6 @@ struct ec_response_i2c_passthru_protect {
|
||||
uint8_t status; /* Status flags (0: unlocked, 1: locked) */
|
||||
} __ec_align1;
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/*
|
||||
* HDMI CEC commands
|
||||
@@ -5148,10 +5131,8 @@ struct __ec_align4 ec_param_ec_codec {
|
||||
uint8_t reserved[3];
|
||||
|
||||
union {
|
||||
struct ec_param_ec_codec_get_shm_addr
|
||||
get_shm_addr_param;
|
||||
struct ec_param_ec_codec_set_shm_addr
|
||||
set_shm_addr_param;
|
||||
struct ec_param_ec_codec_get_shm_addr get_shm_addr_param;
|
||||
struct ec_param_ec_codec_set_shm_addr set_shm_addr_param;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -5206,10 +5187,8 @@ struct __ec_align4 ec_param_ec_codec_dmic {
|
||||
uint8_t reserved[3];
|
||||
|
||||
union {
|
||||
struct ec_param_ec_codec_dmic_set_gain_idx
|
||||
set_gain_idx_param;
|
||||
struct ec_param_ec_codec_dmic_get_gain_idx
|
||||
get_gain_idx_param;
|
||||
struct ec_param_ec_codec_dmic_set_gain_idx set_gain_idx_param;
|
||||
struct ec_param_ec_codec_dmic_get_gain_idx get_gain_idx_param;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -5277,10 +5256,8 @@ struct __ec_align4 ec_param_ec_codec_i2s_rx {
|
||||
union {
|
||||
struct ec_param_ec_codec_i2s_rx_set_sample_depth
|
||||
set_sample_depth_param;
|
||||
struct ec_param_ec_codec_i2s_rx_set_daifmt
|
||||
set_daifmt_param;
|
||||
struct ec_param_ec_codec_i2s_rx_set_bclk
|
||||
set_bclk_param;
|
||||
struct ec_param_ec_codec_i2s_rx_set_daifmt set_daifmt_param;
|
||||
struct ec_param_ec_codec_i2s_rx_set_bclk set_bclk_param;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -5325,10 +5302,8 @@ struct __ec_align4 ec_param_ec_codec_wov {
|
||||
uint8_t reserved[3];
|
||||
|
||||
union {
|
||||
struct ec_param_ec_codec_wov_set_lang
|
||||
set_lang_param;
|
||||
struct ec_param_ec_codec_wov_set_lang_shm
|
||||
set_lang_shm_param;
|
||||
struct ec_param_ec_codec_wov_set_lang set_lang_param;
|
||||
struct ec_param_ec_codec_wov_set_lang_shm set_lang_shm_param;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -5490,9 +5465,8 @@ struct ec_params_pd_status {
|
||||
#define PD_STATUS_TCPC_ALERT_1 BIT(4) /* Alert active in port 1 TCPC */
|
||||
#define PD_STATUS_TCPC_ALERT_2 BIT(5) /* Alert active in port 2 TCPC */
|
||||
#define PD_STATUS_TCPC_ALERT_3 BIT(6) /* Alert active in port 3 TCPC */
|
||||
#define PD_STATUS_EC_INT_ACTIVE (PD_STATUS_TCPC_ALERT_0 | \
|
||||
PD_STATUS_TCPC_ALERT_1 | \
|
||||
PD_STATUS_HOST_EVENT)
|
||||
#define PD_STATUS_EC_INT_ACTIVE \
|
||||
(PD_STATUS_TCPC_ALERT_0 | PD_STATUS_TCPC_ALERT_1 | PD_STATUS_HOST_EVENT)
|
||||
struct ec_response_pd_status {
|
||||
uint32_t curr_lim_ma; /* input current limit */
|
||||
uint16_t status; /* PD MCU status */
|
||||
@@ -5567,7 +5541,8 @@ struct ec_params_usb_pd_control {
|
||||
#define PD_CTRL_RESP_ROLE_DR_POWER BIT(3) /* Partner is dualrole power */
|
||||
#define PD_CTRL_RESP_ROLE_DR_DATA BIT(4) /* Partner is dualrole data */
|
||||
#define PD_CTRL_RESP_ROLE_USB_COMM BIT(5) /* Partner USB comm capable */
|
||||
#define PD_CTRL_RESP_ROLE_UNCONSTRAINED BIT(6) /* Partner unconstrained power */
|
||||
#define PD_CTRL_RESP_ROLE_UNCONSTRAINED BIT(6) /* Partner unconstrained power \
|
||||
*/
|
||||
|
||||
struct ec_response_usb_pd_control {
|
||||
uint8_t enabled;
|
||||
@@ -5672,7 +5647,6 @@ struct ec_response_usb_pd_power_info {
|
||||
uint32_t max_power;
|
||||
} __ec_align4;
|
||||
|
||||
|
||||
/*
|
||||
* This command will return the number of USB PD charge port + the number
|
||||
* of dedicated port present.
|
||||
@@ -5775,8 +5749,8 @@ struct ec_response_pd_log {
|
||||
#define PD_LOG_SIZE_MASK 0x1f
|
||||
#define PD_LOG_PORT_MASK 0xe0
|
||||
#define PD_LOG_PORT_SHIFT 5
|
||||
#define PD_LOG_PORT_SIZE(port, size) (((port) << PD_LOG_PORT_SHIFT) | \
|
||||
((size) & PD_LOG_SIZE_MASK))
|
||||
#define PD_LOG_PORT_SIZE(port, size) \
|
||||
(((port) << PD_LOG_PORT_SHIFT) | ((size)&PD_LOG_SIZE_MASK))
|
||||
#define PD_LOG_PORT(size_port) ((size_port) >> PD_LOG_PORT_SHIFT)
|
||||
#define PD_LOG_SIZE(size_port) ((size_port)&PD_LOG_SIZE_MASK)
|
||||
|
||||
@@ -5883,7 +5857,6 @@ struct ec_params_pd_write_log_entry {
|
||||
uint8_t port; /* port#, or 0 for events unrelated to a given port */
|
||||
} __ec_align1;
|
||||
|
||||
|
||||
/* Control USB-PD chip */
|
||||
#define EC_CMD_PD_CONTROL 0x0119
|
||||
|
||||
@@ -6066,16 +6039,19 @@ struct ec_params_set_cbi {
|
||||
#define EC_RESET_FLAG_SYSJUMP BIT(10) /* Jumped directly to this image */
|
||||
#define EC_RESET_FLAG_HARD BIT(11) /* Hard reset from software */
|
||||
#define EC_RESET_FLAG_AP_OFF BIT(12) /* Do not power on AP */
|
||||
#define EC_RESET_FLAG_PRESERVED BIT(13) /* Some reset flags preserved from
|
||||
* previous boot
|
||||
#define EC_RESET_FLAG_PRESERVED \
|
||||
BIT(13) /* Some reset flags preserved from \
|
||||
* previous boot \
|
||||
*/
|
||||
#define EC_RESET_FLAG_USB_RESUME BIT(14) /* USB resume triggered wake */
|
||||
#define EC_RESET_FLAG_RDD BIT(15) /* USB Type-C debug cable */
|
||||
#define EC_RESET_FLAG_RBOX BIT(16) /* Fixed Reset Functionality */
|
||||
#define EC_RESET_FLAG_SECURITY BIT(17) /* Security threat */
|
||||
#define EC_RESET_FLAG_AP_WATCHDOG BIT(18) /* AP experienced a watchdog reset */
|
||||
#define EC_RESET_FLAG_STAY_IN_RO BIT(19) /* Do not select RW in EFS. This
|
||||
* enables PD in RO for Chromebox.
|
||||
#define EC_RESET_FLAG_AP_WATCHDOG BIT(18) /* AP experienced a watchdog reset \
|
||||
*/
|
||||
#define EC_RESET_FLAG_STAY_IN_RO \
|
||||
BIT(19) /* Do not select RW in EFS. This \
|
||||
* enables PD in RO for Chromebox. \
|
||||
*/
|
||||
#define EC_RESET_FLAG_EFS BIT(20) /* Jumped to this image by EFS */
|
||||
#define EC_RESET_FLAG_AP_IDLE BIT(21) /* Leave alone AP */
|
||||
@@ -6147,7 +6123,6 @@ enum chipset_shutdown_reason {
|
||||
CHIPSET_SHUTDOWN_COUNT, /* End of shutdown reasons. */
|
||||
};
|
||||
|
||||
|
||||
struct ec_response_uptime_info {
|
||||
/*
|
||||
* Number of milliseconds since the last EC boot. Sysjump resets
|
||||
@@ -6239,7 +6214,6 @@ struct ec_response_rollback_info {
|
||||
int32_t rw_rollback_version;
|
||||
} __ec_align4;
|
||||
|
||||
|
||||
/* Issue AP reset */
|
||||
#define EC_CMD_AP_RESET 0x0125
|
||||
|
||||
@@ -6281,7 +6255,6 @@ struct ec_params_locate_chip {
|
||||
};
|
||||
} __ec_align2;
|
||||
|
||||
|
||||
struct ec_response_locate_chip {
|
||||
uint8_t bus_type; /* enum ec_bus_type */
|
||||
uint8_t reserved; /* Aligning the following union to 2 bytes */
|
||||
@@ -6725,10 +6698,7 @@ struct ec_params_typec_control {
|
||||
* the Power Delivery Specification Revision 3.0 (See
|
||||
* 6.2.1.1.4 Port Power Role).
|
||||
*/
|
||||
enum pd_power_role {
|
||||
PD_ROLE_SINK = 0,
|
||||
PD_ROLE_SOURCE = 1
|
||||
};
|
||||
enum pd_power_role { PD_ROLE_SINK = 0, PD_ROLE_SOURCE = 1 };
|
||||
|
||||
/*
|
||||
* Data role.
|
||||
@@ -6989,14 +6959,14 @@ enum pchg_state {
|
||||
PCHG_STATE_COUNT,
|
||||
};
|
||||
|
||||
#define EC_PCHG_STATE_TEXT { \
|
||||
#define EC_PCHG_STATE_TEXT \
|
||||
{ \
|
||||
[PCHG_STATE_RESET] = "RESET", \
|
||||
[PCHG_STATE_INITIALIZED] = "INITIALIZED", \
|
||||
[PCHG_STATE_ENABLED] = "ENABLED", \
|
||||
[PCHG_STATE_DETECTED] = "DETECTED", \
|
||||
[PCHG_STATE_CHARGING] = "CHARGING", \
|
||||
[PCHG_STATE_FULL] = "FULL", \
|
||||
[PCHG_STATE_DOWNLOAD] = "DOWNLOAD", \
|
||||
[PCHG_STATE_FULL] = "FULL", [PCHG_STATE_DOWNLOAD] = "DOWNLOAD", \
|
||||
[PCHG_STATE_DOWNLOADING] = "DOWNLOADING", \
|
||||
[PCHG_STATE_CONNECTED] = "CONNECTED", \
|
||||
}
|
||||
@@ -7012,8 +6982,7 @@ enum pchg_state {
|
||||
#define EC_MKBP_PCHG_EVENT_TO_PORT(e) (((e) >> EC_MKBP_PCHG_PORT_SHIFT) & 0xf)
|
||||
#define EC_MKBP_PCHG_PORT_TO_EVENT(p) ((p) << EC_MKBP_PCHG_PORT_SHIFT)
|
||||
/* Utility macro for extracting event bits. */
|
||||
#define EC_MKBP_PCHG_EVENT_MASK(e) ((e) \
|
||||
& GENMASK(EC_MKBP_PCHG_PORT_SHIFT-1, 0))
|
||||
#define EC_MKBP_PCHG_EVENT_MASK(e) ((e)&GENMASK(EC_MKBP_PCHG_PORT_SHIFT - 1, 0))
|
||||
|
||||
#define EC_MKBP_PCHG_UPDATE_OPENED BIT(0)
|
||||
#define EC_MKBP_PCHG_WRITE_COMPLETE BIT(1)
|
||||
@@ -7054,15 +7023,14 @@ struct ec_params_pchg_update {
|
||||
uint8_t data[];
|
||||
} __ec_align4;
|
||||
|
||||
BUILD_ASSERT(EC_PCHG_UPDATE_CMD_COUNT
|
||||
< BIT(sizeof(((struct ec_params_pchg_update *)0)->cmd)*8));
|
||||
BUILD_ASSERT(EC_PCHG_UPDATE_CMD_COUNT <
|
||||
BIT(sizeof(((struct ec_params_pchg_update *)0)->cmd) * 8));
|
||||
|
||||
struct ec_response_pchg_update {
|
||||
/* Block size */
|
||||
uint32_t block_size;
|
||||
} __ec_align4;
|
||||
|
||||
|
||||
#define EC_CMD_DISPLAY_SOC 0x0137
|
||||
|
||||
struct ec_response_display_soc {
|
||||
@@ -7071,7 +7039,6 @@ struct ec_response_display_soc {
|
||||
int16_t shutdown_soc; /* Shutdown SoC in 10ths of a % (1000=100.0%) */
|
||||
} __ec_align2;
|
||||
|
||||
|
||||
#define EC_CMD_SET_BASE_STATE 0x0138
|
||||
|
||||
struct ec_params_set_base_state {
|
||||
@@ -7217,15 +7184,10 @@ struct ec_params_fp_passthru {
|
||||
/* special value: don't change anything just read back current mode */
|
||||
#define FP_MODE_DONT_CHANGE BIT(31)
|
||||
|
||||
#define FP_VALID_MODES (FP_MODE_DEEPSLEEP | \
|
||||
FP_MODE_FINGER_DOWN | \
|
||||
FP_MODE_FINGER_UP | \
|
||||
FP_MODE_CAPTURE | \
|
||||
FP_MODE_ENROLL_SESSION | \
|
||||
FP_MODE_ENROLL_IMAGE | \
|
||||
FP_MODE_MATCH | \
|
||||
FP_MODE_RESET_SENSOR | \
|
||||
FP_MODE_SENSOR_MAINTENANCE | \
|
||||
#define FP_VALID_MODES \
|
||||
(FP_MODE_DEEPSLEEP | FP_MODE_FINGER_DOWN | FP_MODE_FINGER_UP | \
|
||||
FP_MODE_CAPTURE | FP_MODE_ENROLL_SESSION | FP_MODE_ENROLL_IMAGE | \
|
||||
FP_MODE_MATCH | FP_MODE_RESET_SENSOR | FP_MODE_SENSOR_MAINTENANCE | \
|
||||
FP_MODE_DONT_CHANGE)
|
||||
|
||||
/* Capture types defined in bits [30..28] */
|
||||
@@ -7257,8 +7219,8 @@ enum fp_capture_type {
|
||||
FP_CAPTURE_TYPE_MAX,
|
||||
};
|
||||
/* Extracts the capture type from the sensor 'mode' word */
|
||||
#define FP_CAPTURE_TYPE(mode) (((mode) & FP_MODE_CAPTURE_TYPE_MASK) \
|
||||
>> FP_MODE_CAPTURE_TYPE_SHIFT)
|
||||
#define FP_CAPTURE_TYPE(mode) \
|
||||
(((mode)&FP_MODE_CAPTURE_TYPE_MASK) >> FP_MODE_CAPTURE_TYPE_SHIFT)
|
||||
|
||||
struct ec_params_fp_mode {
|
||||
uint32_t mode; /* as defined by FP_MODE_ constants */
|
||||
|
Reference in New Issue
Block a user