From ae196ddb0d3186bc08e529b8ea4bf62161ddfce2 Mon Sep 17 00:00:00 2001 From: Heikki Krogerus Date: Wed, 7 Apr 2021 09:55:52 +0300 Subject: 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 Link: https://lore.kernel.org/r/20210407065555.88110-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/typec/class.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/usb/typec/class.h') 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__ */ -- cgit v1.2.3