aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/typec/class.h
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2021-04-07 09:55:52 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-09 16:00:00 +0200
commitae196ddb0d3186bc08e529b8ea4bf62161ddfce2 (patch)
tree874f3934376726b9207c5510e8223fd106c4ea15 /drivers/usb/typec/class.h
parentusb: typec: tcpm: update power supply once partner accepts (diff)
downloadlinux-dev-ae196ddb0d3186bc08e529b8ea4bf62161ddfce2.tar.xz
linux-dev-ae196ddb0d3186bc08e529b8ea4bf62161ddfce2.zip
usb: typec: Port mapping utility
Adding functions that can be used to link/unlink ports - USB ports, TBT3/USB4 ports, DisplayPorts and so on - to the USB Type-C connectors they are attached to inside a system. The symlink that is created for the port device is named "connector". Initially only ACPI is supported. ACPI port object shares the _PLD (Physical Location of Device) with the USB Type-C connector that it's attached to. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20210407065555.88110-2-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.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/typec/class.h b/drivers/usb/typec/class.h
index d414be58d122..52294f7020a8 100644
--- a/drivers/usb/typec/class.h
+++ b/drivers/usb/typec/class.h
@@ -54,6 +54,11 @@ struct typec_port {
const struct typec_capability *cap;
const struct typec_operations *ops;
+
+ struct list_head port_list;
+ struct mutex port_list_lock; /* Port list lock */
+
+ void *pld;
};
#define to_typec_port(_dev_) container_of(_dev_, struct typec_port, dev)
@@ -72,5 +77,9 @@ extern const struct device_type typec_port_dev_type;
#define is_typec_port(dev) ((dev)->type == &typec_port_dev_type)
extern struct class typec_mux_class;
+extern struct class typec_class;
+
+void *get_pld(struct device *dev);
+void free_pld(void *pld);
#endif /* __USB_TYPEC_CLASS__ */