diff options
author | Prashant Malani <pmalani@chromium.org> | 2021-02-02 18:15:37 -0800 |
---|---|---|
committer | Benson Leung <bleung@chromium.org> | 2021-02-04 10:09:42 -0800 |
commit | b64afd949ee3a61e180813859b50aced26023c55 (patch) | |
tree | 1a427ad02da383bd0f9a26d109d74798e62deafa | |
parent | 64eaa0fa66ac55965f793a8b65730299854e55cd (diff) |
platform/chrome: cros_ec: Import Type C control command
This command is used to communicate with the Chrome Embedded Controller
(EC) regarding USB Type C events and state.
These header updates are included in the latest Chrome OS EC headers [1]
[1]
https://chromium.googlesource.com/chromiumos/platform/ec/+/refs/heads/main/include/ec_commands.h
Signed-off-by: Prashant Malani <pmalani@chromium.org>
Link: https://lore.kernel.org/r/20210203021539.745239-1-pmalani@chromium.org
Signed-off-by: Benson Leung <bleung@chromium.org>
-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. * |