History

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

Linus Torvalds committed 4 years ago

Commit 1c2daf52 parents c3f13bb 8edd27513 files · +536 −22Browse files

Showing the changes to include/linux/platform_data (2 of 13 files). Show all

Unified · Split

2 files
  1. include/linux/platform_data/cros_ec_commands.h +18 −0
  2. include/linux/platform_data/cros_ec_proto.h +1 −0
include/linux/platform_data/cros_ec_commands.h+18−0
@@ -5724,8 +5724,21 @@ enum typec_control_command { · 5723 unmodified lines
57245724 TYPEC_CONTROL_COMMAND_EXIT_MODES,
57255725 TYPEC_CONTROL_COMMAND_CLEAR_EVENTS,
57265726 TYPEC_CONTROL_COMMAND_ENTER_MODE,
5727+ TYPEC_CONTROL_COMMAND_TBT_UFP_REPLY,
5728+ TYPEC_CONTROL_COMMAND_USB_MUX_SET,
57275729 };
57285730
5731+/* Replies the AP may specify to the TBT EnterMode command as a UFP */
5732+enum typec_tbt_ufp_reply {
5733+ TYPEC_TBT_UFP_REPLY_NAK,
5734+ TYPEC_TBT_UFP_REPLY_ACK,
5735+};
5736+
5737+struct typec_usb_mux_set {
5738+ uint8_t mux_index; /* Index of the mux to set in the chain */
5739+ uint8_t mux_flags; /* USB_PD_MUX_*-encoded USB mux state to set */
5740+} __ec_align1;
5741+
57295742 struct ec_params_typec_control {
57305743 uint8_t port;
57315744 uint8_t command; /* enum typec_control_command */
@@ -5739,6 +5752,8 @@ struct ec_params_typec_control { · 7 unmodified lines
57395752 union {
57405753 uint32_t clear_events_mask;
57415754 uint8_t mode_to_enter; /* enum typec_mode */
5755+ uint8_t tbt_ufp_reply; /* enum typec_tbt_ufp_reply */
5756+ struct typec_usb_mux_set mux_params;
57425757 uint8_t placeholder[128];
57435758 };
57445759 } __ec_align1;
@@ -5817,6 +5832,9 @@ enum tcpc_cc_polarity { · 72 unmodified lines
58175832 #define PD_STATUS_EVENT_SOP_DISC_DONE BIT(0)
58185833 #define PD_STATUS_EVENT_SOP_PRIME_DISC_DONE BIT(1)
58195834 #define PD_STATUS_EVENT_HARD_RESET BIT(2)
5835+#define PD_STATUS_EVENT_DISCONNECTED BIT(3)
5836+#define PD_STATUS_EVENT_MUX_0_SET_DONE BIT(4)
5837+#define PD_STATUS_EVENT_MUX_1_SET_DONE BIT(5)
58205838
58215839 struct ec_params_typec_status {
58225840 uint8_t port;
include/linux/platform_data/cros_ec_proto.h+1−0
@@ -169,6 +169,7 @@ struct cros_ec_device { · 168 unmodified lines
169169 int event_size;
170170 u32 host_event_wake_mask;
171171 u32 last_resume_result;
172+ u16 suspend_timeout_ms;
172173 ktime_t last_event_time;
173174 struct notifier_block notifier_ready;
174175