diff options
author | Linus Torvalds | 2022-10-05 10:14:48 -0700 |
---|---|---|
committer | Linus Torvalds | 2022-10-05 10:14:48 -0700 |
commit | 1c2daf52185bbc91421f0e84e6bf2706bb350cce (patch) | |
tree | 9ea3cb05ced3148a46dfe6b729766ae8fd415766 /include/linux/platform_data | |
parent | c3f13bbfc2f0240743a4d03a8a890d03730f5a6d (diff) | |
parent | 8edd2752b0aa498b3a61f3caee8f79f7e0567fad (diff) |
Merge tag 'tag-chrome-platform-for-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux
Pull chrome platform updates from Tzung-Bi Shih:
"cros_ec_proto:
- Fix protocol failure if EC firmware jumps to RO part
cros_typec_switch:
- Add USB Type-C switch driver for mode switches and retimers
- Integrate to EC for retimers, status update, and mode switches
- Clean-ups
cros_ec_typec:
- Clean-ups
- Use partner PDOs to register USB PD capabilities
chromeos_laptop:
- Fix a double-free
cros_ec_chardev:
- Check data length from userland to avoid a memory corruption
cros_ec:
- Expose suspend_timeout_ms in debugfs
- Notify the PM about wake events during resume"
* tag 'tag-chrome-platform-for-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
platform/chrome: cros_ec: Notify the PM of wake events during resume
platform/chrome: cros_ec_typec: Register partner PDOs
platform/chrome: cros_typec_switch: Inline DRV_NAME
platform/chrome: cros_typec_switch: Use PTR_ERR_OR_ZERO() to simplify
platform/chrome: cros_typec_switch: Remove impossible condition
platform/chrome: cros_typec_switch: Add missing newline on printk
platform/chrome: cros_ec_typec: Correct alt mode index
platform/chrome: cros_ec_typec: Add bit offset for DP VDO
platform/chrome: cros_ec: Expose suspend_timeout_ms in debugfs
platform/chrome: fix memory corruption in ioctl
platform/chrome: fix double-free in chromeos_laptop_prepare()
platform/chrome: cros_ec_typec: Get retimer handle
platform/chrome: cros_ec_typec: Cleanup switch handle return paths
platform/chrome: cros_typec_switch: Register mode switches
platform/chrome: cros_typec_switch: Add event check
platform/chrome: cros_typec_switch: Set EC retimer
platform/chrome: cros_typec_switch: Add switch driver
platform/chrome: Add Type-C mux set command definitions
platform/chrome: cros_ec_proto: Update version on GET_NEXT_EVENT failure
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r-- | include/linux/platform_data/cros_ec_commands.h | 18 | ||||
-rw-r--r-- | include/linux/platform_data/cros_ec_proto.h | 1 |
2 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/platform_data/cros_ec_commands.h b/include/linux/platform_data/cros_ec_commands.h index 8b1b795867a1..5744a2d746aa 100644 --- a/include/linux/platform_data/cros_ec_commands.h +++ b/include/linux/platform_data/cros_ec_commands.h @@ -5724,8 +5724,21 @@ enum typec_control_command { TYPEC_CONTROL_COMMAND_EXIT_MODES, TYPEC_CONTROL_COMMAND_CLEAR_EVENTS, TYPEC_CONTROL_COMMAND_ENTER_MODE, + TYPEC_CONTROL_COMMAND_TBT_UFP_REPLY, + TYPEC_CONTROL_COMMAND_USB_MUX_SET, }; +/* Replies the AP may specify to the TBT EnterMode command as a UFP */ +enum typec_tbt_ufp_reply { + TYPEC_TBT_UFP_REPLY_NAK, + TYPEC_TBT_UFP_REPLY_ACK, +}; + +struct typec_usb_mux_set { + uint8_t mux_index; /* Index of the mux to set in the chain */ + uint8_t mux_flags; /* USB_PD_MUX_*-encoded USB mux state to set */ +} __ec_align1; + struct ec_params_typec_control { uint8_t port; uint8_t command; /* enum typec_control_command */ @@ -5739,6 +5752,8 @@ struct ec_params_typec_control { union { uint32_t clear_events_mask; uint8_t mode_to_enter; /* enum typec_mode */ + uint8_t tbt_ufp_reply; /* enum typec_tbt_ufp_reply */ + struct typec_usb_mux_set mux_params; uint8_t placeholder[128]; }; } __ec_align1; @@ -5817,6 +5832,9 @@ enum tcpc_cc_polarity { #define PD_STATUS_EVENT_SOP_DISC_DONE BIT(0) #define PD_STATUS_EVENT_SOP_PRIME_DISC_DONE BIT(1) #define PD_STATUS_EVENT_HARD_RESET BIT(2) +#define PD_STATUS_EVENT_DISCONNECTED BIT(3) +#define PD_STATUS_EVENT_MUX_0_SET_DONE BIT(4) +#define PD_STATUS_EVENT_MUX_1_SET_DONE BIT(5) struct ec_params_typec_status { uint8_t port; diff --git a/include/linux/platform_data/cros_ec_proto.h b/include/linux/platform_data/cros_ec_proto.h index 408b29ca4004..e43107e0bee1 100644 --- a/include/linux/platform_data/cros_ec_proto.h +++ b/include/linux/platform_data/cros_ec_proto.h @@ -169,6 +169,7 @@ struct cros_ec_device { int event_size; u32 host_event_wake_mask; u32 last_resume_result; + u16 suspend_timeout_ms; ktime_t last_event_time; struct notifier_block notifier_ready; |