Copy EC header definitions for the USB Type-C Mux control command from the EC code base. Also pull in "TBT_UFP_REPLY" definitions, since that is the prior entry in the enum. These headers are already present in the EC code base. [1] [1] https://chromium.googlesource.com/chromiumos/platform/ec/+/b80f85a94a423273c1638ef7b662c56931a138dd/include/ec_commands.h
Showing the changes to include/linux/platform_data (1 of 1 file). Show all
Unified · Split
| @@ -5724,8 +5724,21 @@ enum typec_control_command { · 5723 unmodified lines | ||
| 5724 | 5724 | TYPEC_CONTROL_COMMAND_EXIT_MODES, |
| 5725 | 5725 | TYPEC_CONTROL_COMMAND_CLEAR_EVENTS, |
| 5726 | 5726 | TYPEC_CONTROL_COMMAND_ENTER_MODE, |
| 5727 | + TYPEC_CONTROL_COMMAND_TBT_UFP_REPLY, | |
| 5728 | + TYPEC_CONTROL_COMMAND_USB_MUX_SET, | |
| 5727 | 5729 | }; |
| 5728 | 5730 | |
| 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 | + | |
| 5729 | 5742 | struct ec_params_typec_control { |
| 5730 | 5743 | uint8_t port; |
| 5731 | 5744 | uint8_t command; /* enum typec_control_command */ |
| @@ -5739,6 +5752,8 @@ struct ec_params_typec_control { · 7 unmodified lines | ||
| 5739 | 5752 | union { |
| 5740 | 5753 | uint32_t clear_events_mask; |
| 5741 | 5754 | 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; | |
| 5742 | 5757 | uint8_t placeholder[128]; |
| 5743 | 5758 | }; |
| 5744 | 5759 | } __ec_align1; |
| @@ -5817,6 +5832,9 @@ enum tcpc_cc_polarity { · 72 unmodified lines | ||
| 5817 | 5832 | #define PD_STATUS_EVENT_SOP_DISC_DONE BIT(0) |
| 5818 | 5833 | #define PD_STATUS_EVENT_SOP_PRIME_DISC_DONE BIT(1) |
| 5819 | 5834 | #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) | |
| 5820 | 5838 | |
| 5821 | 5839 | struct ec_params_typec_status { |
| 5822 | 5840 | uint8_t port; |