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>
This commit is contained in:
parent
4050f2683f
commit
ae196ddb0d
5 changed files with 248 additions and 2 deletions
|
|
@ -298,4 +298,17 @@ int typec_find_port_data_role(const char *name);
|
|||
void typec_partner_set_svdm_version(struct typec_partner *partner,
|
||||
enum usb_pd_svdm_ver svdm_version);
|
||||
int typec_get_negotiated_svdm_version(struct typec_port *port);
|
||||
|
||||
#if IS_REACHABLE(CONFIG_TYPEC)
|
||||
int typec_link_port(struct device *port);
|
||||
void typec_unlink_port(struct device *port);
|
||||
#else
|
||||
static inline int typec_link_port(struct device *port)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void typec_unlink_port(struct device *port) { }
|
||||
#endif
|
||||
|
||||
#endif /* __LINUX_USB_TYPEC_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue