usb: typec: USB Power Delivery helpers for ports and partners
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Mon, 2 May 2022 13:20:57 +0000 (16:20 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 12 Jun 2022 04:49:47 +0000 (06:49 +0200)
commita7cff92f0635c794e2198a69a7ff4ecfe0decab9
tree7dd8f528a8b634d5022aac02dfc2a5055f5b59dd
parent662a60102c122e44fdaf5c826f7f415eb57d48ad
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>
Documentation/ABI/testing/sysfs-class-typec
drivers/usb/typec/class.c
drivers/usb/typec/class.h
include/linux/usb/typec.h