mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-27 14:43:58 +08:00
287905e68d
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>
9 lines
363 B
Plaintext
9 lines
363 B
Plaintext
What: /sys/devices/.../consumer:<consumer>
|
|
Date: May 2020
|
|
Contact: Saravana Kannan <saravanak@google.com>
|
|
Description:
|
|
The /sys/devices/.../consumer:<consumer> are symlinks to device
|
|
links where this device is the supplier. <consumer> denotes the
|
|
name of the consumer in that device link. There can be zero or
|
|
more of these symlinks for a given device.
|