diff options
Diffstat (limited to 'include/linux/usb')
-rw-r--r-- | include/linux/usb/typec.h | 37 |
1 files changed, 9 insertions, 28 deletions
diff --git a/include/linux/usb/typec.h b/include/linux/usb/typec.h index 6c33b53d1162..2dcb1683075f 100644 --- a/include/linux/usb/typec.h +++ b/include/linux/usb/typec.h @@ -93,41 +93,23 @@ int typec_partner_set_identity(struct typec_partner *partner); int typec_cable_set_identity(struct typec_cable *cable); /* - * struct typec_mode_desc - Individual Mode of an Alternate Mode - * @index: Index of the Mode within the SVID + * struct typec_altmode_desc - USB Type-C Alternate Mode Descriptor + * @svid: Standard or Vendor ID + * @mode: Index of the Mode * @vdo: VDO returned by Discover Modes USB PD command - * @desc: Optional human readable description of the mode * @roles: Only for ports. DRP if the mode is available in both roles * - * Description of a mode of an Alternate Mode which a connector, cable plug or - * partner supports. Every mode will have it's own sysfs group. The details are - * the VDO returned by discover modes command, description for the mode and - * active flag telling has the mode being entered or not. + * Description of an Alternate Mode which a connector, cable plug or partner + * supports. */ -struct typec_mode_desc { - int index; +struct typec_altmode_desc { + u16 svid; + u8 mode; u32 vdo; - char *desc; /* Only used with ports */ enum typec_port_type roles; }; -/* - * struct typec_altmode_desc - USB Type-C Alternate Mode Descriptor - * @svid: Standard or Vendor ID - * @n_modes: Number of modes - * @modes: Array of modes supported by the Alternate Mode - * - * Representation of an Alternate Mode that has SVID assigned by USB-IF. The - * array of modes will list the modes of a particular SVID that are supported by - * a connector, partner of a cable plug. - */ -struct typec_altmode_desc { - u16 svid; - int n_modes; - struct typec_mode_desc modes[ALTMODE_MAX_MODES]; -}; - struct typec_altmode *typec_partner_register_altmode(struct typec_partner *partner, const struct typec_altmode_desc *desc); @@ -141,8 +123,7 @@ void typec_unregister_altmode(struct typec_altmode *altmode); struct typec_port *typec_altmode2port(struct typec_altmode *alt); -void typec_altmode_update_active(struct typec_altmode *alt, int mode, - bool active); +void typec_altmode_update_active(struct typec_altmode *alt, bool active); enum typec_plug_index { TYPEC_PLUG_SOP_P, |