usb: typec: Link enumerated USB devices with Type-C partner
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Wed, 11 Oct 2023 10:58:24 +0000 (13:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Oct 2023 18:02:36 +0000 (20:02 +0200)
commit59de2a56d127890cc610f3896d5fc31887c54ac2
tree216eee1c028a15c89d89fc610f48ce1fc03a9da2
parent17d6b82d2d6d467149874b883cdba844844b996d
usb: typec: Link enumerated USB devices with Type-C partner

Adding functions that USB hub code can use to inform the
Type-C class about connected USB devices.

Once taken into use, it will allow the Type-C port drivers
to power off components that are not needed, for example if
USB2 device is enumerated, everything that is only relevant
for USB3 (retimers, etc.), can be powered off.

This will also create a symlink "typec" for the USB devices
pointing to the USB Type-C partner device.

Suggested-by: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20231011105825.320062-2-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/ABI/testing/sysfs-bus-usb
drivers/usb/typec/class.c
drivers/usb/typec/class.h
drivers/usb/typec/port-mapper.c
include/linux/usb/typec.h