diff options
author | Saravana Kannan <saravanak@google.com> | 2020-05-21 12:17:58 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-10 15:24:56 +0200 |
commit | 287905e68dd29873bcb7986a8290cd1e4cfde600 (patch) | |
tree | 2aea5d81358554da1110abeb3dfb34a1b25531aa /Documentation/ABI/testing/sysfs-devices-supplier | |
parent | fe940d7362e6d7a5e5086581d0462e00ba766992 (diff) | |
download | linux-287905e68dd29873bcb7986a8290cd1e4cfde600.tar.gz linux-287905e68dd29873bcb7986a8290cd1e4cfde600.tar.bz2 linux-287905e68dd29873bcb7986a8290cd1e4cfde600.zip |
driver core: Expose device link details in sysfs
It's helpful to be able to look at device link details from sysfs. So,
expose it in sysfs.
Say device-A is supplier of device-B. These are the additional files
this patch would create:
/sys/class/devlink/device-A:device-B/
auto_remove_on
consumer/ -> .../device-B/
runtime_pm
status
supplier/ -> .../device-A/
sync_state_only
/sys/devices/.../device-A/
consumer:device-B/ -> /sys/class/devlink/device-A:device-B/
/sys/devices/.../device-B/
supplier:device-A/ -> /sys/class/devlink/device-A:device-B/
That way:
To get a list of all the device link in the system:
ls /sys/class/devlink/
To get the consumer names and links of a device:
ls -d /sys/devices/.../device-X/consumer:*
To get the supplier names and links of a device:
ls -d /sys/devices/.../device-X/supplier:*
Signed-off-by: Saravana Kannan <saravanak@google.com>
Link: https://lore.kernel.org/r/20200521191800.136035-2-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/ABI/testing/sysfs-devices-supplier')
-rw-r--r-- | Documentation/ABI/testing/sysfs-devices-supplier | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/ABI/testing/sysfs-devices-supplier b/Documentation/ABI/testing/sysfs-devices-supplier new file mode 100644 index 000000000000..a919e0db5e90 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-devices-supplier @@ -0,0 +1,8 @@ +What: /sys/devices/.../supplier:<supplier> +Date: May 2020 +Contact: Saravana Kannan <saravanak@google.com> +Description: + The /sys/devices/.../supplier:<supplier> are symlinks to device + links where this device is the consumer. <supplier> denotes the + name of the supplier in that device link. There can be zero or + more of these symlinks for a given device. |