summaryrefslogtreecommitdiff
path: root/drivers/usb/typec/class.h
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2024-10-16 16:18:32 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-10-17 08:41:45 +0200
commit2140a952c4e9c73993ae6d9c2cc674d263d4beab (patch)
tree867b229913281cd95c8e6cf8b654b31628449c4a /drivers/usb/typec/class.h
parent8060bcb109f2d9b85451e84a7a08042da40368df (diff)
usb: typec: Add attribute file showing the USB Modes of the partner
This attribute file shows the supported USB modes (USB 2.0, USB 3.0 and USB4) of the partner, and the currently active mode. The active mode is determined primarily by checking the speed of the enumerated USB device. When USB Power Delivery is supported, the active USB mode should be always the mode that was used with the Enter_USB Message, regardless of the result of the USB enumeration. The port drivers can separately assign the mode with a dedicated API. If USB Power Delivery Identity is supplied for the partner device, the supported modes are extracted from it. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20241016131834.898599-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec/class.h')
-rw-r--r--drivers/usb/typec/class.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/typec/class.h b/drivers/usb/typec/class.h
index 85bc50aa54f7..b3076a24ad2e 100644
--- a/drivers/usb/typec/class.h
+++ b/drivers/usb/typec/class.h
@@ -35,6 +35,8 @@ struct typec_partner {
int num_altmodes;
u16 pd_revision; /* 0300H = "3.0" */
enum usb_pd_svdm_ver svdm_version;
+ enum usb_mode usb_mode;
+ u8 usb_capability;
struct usb_power_delivery *pd;