summaryrefslogtreecommitdiff
path: root/drivers/usb/typec/class.h
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2022-05-02 16:20:57 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-12 06:49:47 +0200
commita7cff92f0635c794e2198a69a7ff4ecfe0decab9 (patch)
tree7dd8f528a8b634d5022aac02dfc2a5055f5b59dd /drivers/usb/typec/class.h
parent662a60102c122e44fdaf5c826f7f415eb57d48ad (diff)
usb: typec: USB Power Delivery helpers for ports and partners
All the USB Type-C Connector Class devices are protected, so the drivers can not directly access them. This will adds a few helpers that can be used to link the ports and partners to the correct USB Power Delivery objects. For ports a new optional sysfs attribute file is also added that can be used to select the USB Power Delivery capabilities that the port will advertise to the partner. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20220502132058.86236-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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/typec/class.h b/drivers/usb/typec/class.h
index 0f1bd6d19d67..b531f9853bc0 100644
--- a/drivers/usb/typec/class.h
+++ b/drivers/usb/typec/class.h
@@ -33,6 +33,8 @@ struct typec_partner {
int num_altmodes;
u16 pd_revision; /* 0300H = "3.0" */
enum usb_pd_svdm_ver svdm_version;
+
+ struct usb_power_delivery *pd;
};
struct typec_port {
@@ -40,6 +42,8 @@ struct typec_port {
struct device dev;
struct ida mode_ids;
+ struct usb_power_delivery *pd;
+
int prefer_role;
enum typec_data_role data_role;
enum typec_role pwr_role;