chrome platform changes for v6.1
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. -----BEGIN PGP SIGNATURE----- iIkEABYIADEWIQS0yQeDP3cjLyifNRUrxTEGBto89AUCYzut7RMcdHp1bmdiaUBr ZXJuZWwub3JnAAoJECvFMQYG2jz011UA/ioEJfKhK0HT4uwe6TfW6hAtmnk4ZipR Q7dTPH272723AP47SkcfYJK/GxBV9GIxyqOqfnhbFaxWu6fid2a4D8UCAw== =/Xux -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
1c2daf5218
13 changed files with 536 additions and 22 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue