diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-02-05 10:04:33 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-02-05 10:04:33 +0100 |
| commit | 89451aabea5f91a6c1b6dc4c52cac4caffecbc8a (patch) | |
| tree | 111c277dce9b0d11af756bf4e3f41464ce523c18 /include/linux | |
| parent | 8dc6e6dd1bee39cd65a232a17d51240fc65a0f4a (diff) | |
| parent | c8ec21c6d25c2a8895614ea38575dadb8570c2f9 (diff) | |
Merge tag 'tag-ib-usb-typec-chrome-platform-cros-ec-typec-clear-pd-discovery-events-for-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux into usb-next
Benson writes:
clear-pd-discovery-events
This pair of patches fixes an issue where cros_ec_typec creates stale
cable nodes on detach because of uncleared pd discovery status events.
* tag 'tag-ib-usb-typec-chrome-platform-cros-ec-typec-clear-pd-discovery-events-for-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
platform/chrome: cros_ec_typec: Clear Type C disc events
platform/chrome: cros_ec: Import Type C control command
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/platform_data/cros_ec_commands.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/platform_data/cros_ec_commands.h b/include/linux/platform_data/cros_ec_commands.h index 9787715540c7..50e1caad81be 100644 --- a/include/linux/platform_data/cros_ec_commands.h +++ b/include/linux/platform_data/cros_ec_commands.h @@ -5577,6 +5577,32 @@ struct ec_response_typec_discovery { struct svid_mode_info svids[0]; } __ec_align1; +/* USB Type-C commands for AP-controlled device policy. */ +#define EC_CMD_TYPEC_CONTROL 0x0132 + +enum typec_control_command { + TYPEC_CONTROL_COMMAND_EXIT_MODES, + TYPEC_CONTROL_COMMAND_CLEAR_EVENTS, + TYPEC_CONTROL_COMMAND_ENTER_MODE, +}; + +struct ec_params_typec_control { + uint8_t port; + uint8_t command; /* enum typec_control_command */ + uint16_t reserved; + + /* + * This section will be interpreted based on |command|. Define a + * placeholder structure to avoid having to increase the size and bump + * the command version when adding new sub-commands. + */ + union { + uint32_t clear_events_mask; + uint8_t mode_to_enter; /* enum typec_mode */ + uint8_t placeholder[128]; + }; +} __ec_align1; + /* * Gather all status information for a port. * |
