Skip to content

Commit ba098ed

Browse files
dnojiriTzung-Bi Shih
authored andcommitted
platform/chrome: Add struct ec_response_get_next_event_v3
Add struct ec_response_get_next_event_v3 to upgrade EC_CMD_GET_NEXT_EVENT to version 3. Signed-off-by: Daisuke Nojiri <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tzung-Bi Shih <[email protected]>
1 parent bc3e452 commit ba098ed

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

include/linux/platform_data/cros_ec_commands.h

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3463,6 +3463,34 @@ union __ec_align_offset1 ec_response_get_next_data_v1 {
34633463
};
34643464
BUILD_ASSERT(sizeof(union ec_response_get_next_data_v1) == 16);
34653465

3466+
union __ec_align_offset1 ec_response_get_next_data_v3 {
3467+
uint8_t key_matrix[18];
3468+
3469+
/* Unaligned */
3470+
uint32_t host_event;
3471+
uint64_t host_event64;
3472+
3473+
struct __ec_todo_unpacked {
3474+
/* For aligning the fifo_info */
3475+
uint8_t reserved[3];
3476+
struct ec_response_motion_sense_fifo_info info;
3477+
} sensor_fifo;
3478+
3479+
uint32_t buttons;
3480+
3481+
uint32_t switches;
3482+
3483+
uint32_t fp_events;
3484+
3485+
uint32_t sysrq;
3486+
3487+
/* CEC events from enum mkbp_cec_event */
3488+
uint32_t cec_events;
3489+
3490+
uint8_t cec_message[16];
3491+
};
3492+
BUILD_ASSERT(sizeof(union ec_response_get_next_data_v3) == 18);
3493+
34663494
struct ec_response_get_next_event {
34673495
uint8_t event_type;
34683496
/* Followed by event data if any */
@@ -3475,6 +3503,12 @@ struct ec_response_get_next_event_v1 {
34753503
union ec_response_get_next_data_v1 data;
34763504
} __ec_align1;
34773505

3506+
struct ec_response_get_next_event_v3 {
3507+
uint8_t event_type;
3508+
/* Followed by event data if any */
3509+
union ec_response_get_next_data_v3 data;
3510+
} __ec_align1;
3511+
34783512
/* Bit indices for buttons and switches.*/
34793513
/* Buttons */
34803514
#define EC_MKBP_POWER_BUTTON 0

0 commit comments

Comments
 (0)