diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2020-11-26 14:57:35 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-11-26 15:40:43 +0300 |
commit | ab37fa851c488be805f6568ecaabb67b13cd937c (patch) | |
tree | 13fb82d8a7bea098fb8c1c5685aa36375cceea0c /Documentation/ABI/testing/sysfs-class-typec | |
parent | 52170e937866b3bac1572ed48a97d370f42e52fa (diff) | |
download | linux-ab37fa851c488be805f6568ecaabb67b13cd937c.tar.xz |
usb: typec: Add type sysfs attribute file for partners
USB Power Delivery Specification defines a set of product
types for partners and cables. The product type can be read
from the ID Header VDO which is the first object in the
response to the Discover Identity command. This attribute
will display the product type of the partner. The cables
already have the attribute.
This sysfs attribute file is only created for the partners
and cables if the product type is really known in the
driver. Some interfaces do not give access to the Discover
Identity response from the partner or cable, but they may
still supply the product type separately in some cases.
When the product type of the partner or cable is detected,
uevent is also raised with PRODUCT_TYPE set to show the
actual product type (for example PRODUCT_TYPE=host).
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20201126115735.50529-1-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/ABI/testing/sysfs-class-typec')
-rw-r--r-- | Documentation/ABI/testing/sysfs-class-typec | 64 |
1 files changed, 61 insertions, 3 deletions
diff --git a/Documentation/ABI/testing/sysfs-class-typec b/Documentation/ABI/testing/sysfs-class-typec index 619c4c67432b..8eab41e79ce6 100644 --- a/Documentation/ABI/testing/sysfs-class-typec +++ b/Documentation/ABI/testing/sysfs-class-typec @@ -147,6 +147,52 @@ Description: during Power Delivery discovery. This file remains hidden until a value greater than or equal to 0 is set by Type C port driver. +What: /sys/class/typec/<port>-partner/type +Date: December 2020 +Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com> +Description: USB Power Delivery Specification defines a set of product types + for the partner devices. This file will show the product type of + the partner if it is known. Dual-role capable partners will have + both UFP and DFP product types defined, but only one that + matches the current role will be active at the time. If the + product type of the partner is not visible to the device driver, + this file will not exist. + + When the partner product type is detected, or changed with role + swap, uvevent is also raised that contains PRODUCT_TYPE=<product + type> (for example PRODUCT_TYPE=hub). + + Valid values: + + UFP / device role + ====================== ========================== + undefined - + hub PDUSB Hub + peripheral PDUSB Peripheral + psd Power Bank + ama Alternate Mode Adapter + ====================== ========================== + + DFP / host role + ====================== ========================== + undefined - + hub PDUSB Hub + host PDUSB Host + power_brick Power Brick + amc Alternate Mode Controller + ====================== ========================== + +What: /sys/class/typec/<port>-partner>/identity/ +Date: April 2017 +Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com> +Description: + This directory appears only if the port device driver is capable + of showing the result of Discover Identity USB power delivery + command. That will not always be possible even when USB power + delivery is supported, for example when USB power delivery + communication for the port is mostly handled in firmware. If the + directory exists, it will have an attribute file for every VDO + in Discover Identity command result. USB Type-C cable devices (eg. /sys/class/typec/port0-cable/) @@ -159,9 +205,21 @@ described in USB Type-C and USB Power Delivery specifications. What: /sys/class/typec/<port>-cable/type Date: April 2017 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com> -Description: - Shows if the cable is active. - Valid values: active, passive +Description: USB Power Delivery Specification defines a set of product types + for the cables. This file will show the product type of the + cable if it is known. If the product type of the cable is not + visible to the device driver, this file will not exist. + + When the cable product type is detected, uvevent is also raised + with PRODUCT_TYPE showing the product type of the cable. + + Valid values: + + ====================== ========================== + undefined - + active Active Cable + passive Passive Cable + ====================== ========================== What: /sys/class/typec/<port>-cable/plug_type Date: April 2017 |