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
Showing the changes to include/linux/platform_data (1 of 1 file). Show all
Unified · Split
| @@ -5577,6 +5577,32 @@ struct ec_response_typec_discovery { · 5576 unmodified lines | ||
| 5577 | 5577 | struct svid_mode_info svids[0]; |
| 5578 | 5578 | } __ec_align1; |
| 5579 | 5579 | |
| 5580 | +/* USB Type-C commands for AP-controlled device policy. */ | |
| 5581 | +#define EC_CMD_TYPEC_CONTROL 0x0132 | |
| 5582 | + | |
| 5583 | +enum typec_control_command { | |
| 5584 | + TYPEC_CONTROL_COMMAND_EXIT_MODES, | |
| 5585 | + TYPEC_CONTROL_COMMAND_CLEAR_EVENTS, | |
| 5586 | + TYPEC_CONTROL_COMMAND_ENTER_MODE, | |
| 5587 | +}; | |
| 5588 | + | |
| 5589 | +struct ec_params_typec_control { | |
| 5590 | + uint8_t port; | |
| 5591 | + uint8_t command; /* enum typec_control_command */ | |
| 5592 | + uint16_t reserved; | |
| 5593 | + | |
| 5594 | + /* | |
| 5595 | + * This section will be interpreted based on |command|. Define a | |
| 5596 | + * placeholder structure to avoid having to increase the size and bump | |
| 5597 | + * the command version when adding new sub-commands. | |
| 5598 | + */ | |
| 5599 | + union { | |
| 5600 | + uint32_t clear_events_mask; | |
| 5601 | + uint8_t mode_to_enter; /* enum typec_mode */ | |
| 5602 | + uint8_t placeholder[128]; | |
| 5603 | + }; | |
| 5604 | +} __ec_align1; | |
| 5605 | + | |
| 5580 | 5606 | /* |
| 5581 | 5607 | * Gather all status information for a port. |
| 5582 | 5608 | * |