summaryrefslogtreecommitdiff
path: root/Documentation/ABI
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2018-03-20 15:57:04 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-22 13:40:10 +0100
commitfde0aa6c175a4d8aa19e82b86ae0f9278bc8563b (patch)
tree3fc526a1e5440059b25bbbac42deed590a7f3114 /Documentation/ABI
parentbdecb33af34f79cbfbb656661210f77c8b8b5b5f (diff)
usb: common: Small class for USB role switches
USB role switch is a device that can be used to choose the data role for USB connector. With dual-role capable USB controllers, the controller itself will be the switch, but on some platforms the USB host and device controllers are separate IPs and there is a mux between them and the connector. On those platforms the mux driver will need to register the switch. With USB Type-C connectors, the host-to-device relationship is negotiated over the Configuration Channel (CC). That means the USB Type-C drivers need to be in control of the role switch. The class provides a simple API for the USB Type-C drivers for the control. For other types of USB connectors (mainly microAB) the class provides user space control via sysfs attribute file that can be used to request role swapping from the switch. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/ABI')
-rw-r--r--Documentation/ABI/testing/sysfs-class-usb_role21
1 files changed, 21 insertions, 0 deletions
diff --git a/Documentation/ABI/testing/sysfs-class-usb_role b/Documentation/ABI/testing/sysfs-class-usb_role
new file mode 100644
index 000000000000..3b810a425a52
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-usb_role
@@ -0,0 +1,21 @@
+What: /sys/class/usb_role/
+Date: Jan 2018
+Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Description:
+ Place in sysfs for USB Role Switches. USB Role Switch is a
+ device that can select the data role (host or device) for USB
+ port.
+
+What: /sys/class/usb_role/<switch>/role
+Date: Jan 2018
+Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Description:
+ The current role of the switch. This attribute can be used for
+ requesting role swapping with non-USB Type-C ports. With USB
+ Type-C ports, the ABI defined for USB Type-C connector class
+ must be used.
+
+ Valid values:
+ - none
+ - host
+ - device