[PATCH 14/15] usb: typec: Add member for the supported USB modes to struct typec_capability

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The ports can inform which USB modes (USB2, USB3 and USB4)
they support with this member.

This information will be needed once we start using the new
Enter_USB message.

Signed-off-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>
---
 include/linux/usb/typec.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/usb/typec.h b/include/linux/usb/typec.h
index 44d28387ced4..0acfbcd8bf04 100644
--- a/include/linux/usb/typec.h
+++ b/include/linux/usb/typec.h
@@ -72,6 +72,10 @@ enum typec_orientation {
 	TYPEC_ORIENTATION_REVERSE,
 };
 
+#define USB_CAPABILITY_USB2	BIT(0)
+#define USB_CAPABILITY_USB3	BIT(1)
+#define USB_CAPABILITY_USB4	BIT(2)
+
 /*
  * struct usb_pd_identity - USB Power Delivery identity data
  * @id_header: ID Header VDO
@@ -198,6 +202,7 @@ struct typec_operations {
  * @pd_revision: USB Power Delivery Specification revision if supported
  * @prefer_role: Initial role preference (DRP ports).
  * @accessory: Supported Accessory Modes
+ * @usb: Supported USB Modes
  * @fwnode: Optional fwnode of the port
  * @driver_data: Private pointer for driver specific info
  * @ops: Port operations vector
@@ -211,6 +216,7 @@ struct typec_capability {
 	u16			pd_revision; /* 0300H = "3.0" */
 	int			prefer_role;
 	enum typec_accessory	accessory[TYPEC_MAX_ACCESSORY];
+	u8			usb;
 
 	struct fwnode_handle	*fwnode;
 	void			*driver_data;
-- 
2.24.1




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux