0001 What: /sys/class/devlink/.../
0002 Date: May 2020
0003 Contact: Saravana Kannan <saravanak@google.com>
0004 Description:
0005 Provide a place in sysfs for the device link objects in the
0006 kernel at any given time. The name of a device link directory,
0007 denoted as ... above, is of the form <supplier>--<consumer>
0008 where <supplier> is the supplier bus:device name and <consumer>
0009 is the consumer bus:device name.
0010
0011 What: /sys/class/devlink/.../auto_remove_on
0012 Date: May 2020
0013 Contact: Saravana Kannan <saravanak@google.com>
0014 Description:
0015 This file indicates if the device link will ever be
0016 automatically removed by the driver core when the consumer and
0017 supplier devices themselves are still present.
0018
0019 This will be one of the following strings:
0020
0021 - 'consumer unbind'
0022 - 'supplier unbind'
0023 - 'never'
0024
0025 'consumer unbind' means the device link will be removed when
0026 the consumer's driver is unbound from the consumer device.
0027
0028 'supplier unbind' means the device link will be removed when
0029 the supplier's driver is unbound from the supplier device.
0030
0031 'never' means the device link will not be automatically removed
0032 when as long as the supplier and consumer devices themselves
0033 are still present.
0034
0035 What: /sys/class/devlink/.../consumer
0036 Date: May 2020
0037 Contact: Saravana Kannan <saravanak@google.com>
0038 Description:
0039 This file is a symlink to the consumer device's sysfs directory.
0040
0041 What: /sys/class/devlink/.../runtime_pm
0042 Date: May 2020
0043 Contact: Saravana Kannan <saravanak@google.com>
0044 Description:
0045 This file indicates if the device link has any impact on the
0046 runtime power management behavior of the consumer and supplier
0047 devices. For example: Making sure the supplier doesn't enter
0048 runtime suspend while the consumer is active.
0049
0050 This will be one of the following strings:
0051
0052 === ========================================
0053 '0' Does not affect runtime power management
0054 '1' Affects runtime power management
0055 === ========================================
0056
0057 What: /sys/class/devlink/.../status
0058 Date: May 2020
0059 Contact: Saravana Kannan <saravanak@google.com>
0060 Description:
0061 This file indicates the status of the device link. The status
0062 of a device link is affected by whether the supplier and
0063 consumer devices have been bound to their corresponding
0064 drivers. The status of a device link also affects the binding
0065 and unbinding of the supplier and consumer devices with their
0066 drivers and also affects whether the software state of the
0067 supplier device is synced with the hardware state of the
0068 supplier device after boot up.
0069 See also: sysfs-devices-state_synced.
0070
0071 This will be one of the following strings:
0072
0073 - 'not tracked'
0074 - 'dormant'
0075 - 'available'
0076 - 'consumer probing'
0077 - 'active'
0078 - 'supplier unbinding'
0079 - 'unknown'
0080
0081 'not tracked' means this device link does not track the status
0082 and has no impact on the binding, unbinding and syncing the
0083 hardware and software device state.
0084
0085 'dormant' means the supplier and the consumer devices have not
0086 bound to their driver.
0087
0088 'available' means the supplier has bound to its driver and is
0089 available to supply resources to the consumer device.
0090
0091 'consumer probing' means the consumer device is currently
0092 trying to bind to its driver.
0093
0094 'active' means the supplier and consumer devices have both
0095 bound successfully to their drivers.
0096
0097 'supplier unbinding' means the supplier devices is currently in
0098 the process of unbinding from its driver.
0099
0100 'unknown' means the state of the device link is not any of the
0101 above. If this is ever the value, there's a bug in the kernel.
0102
0103 What: /sys/class/devlink/.../supplier
0104 Date: May 2020
0105 Contact: Saravana Kannan <saravanak@google.com>
0106 Description:
0107 This file is a symlink to the supplier device's sysfs directory.
0108
0109 What: /sys/class/devlink/.../sync_state_only
0110 Date: May 2020
0111 Contact: Saravana Kannan <saravanak@google.com>
0112 Description:
0113 This file indicates if the device link is limited to only
0114 affecting the syncing of the hardware and software state of the
0115 supplier device.
0116
0117 This will be one of the following strings:
0118
0119 === ================================
0120 '0'
0121 '1' Affects runtime power management
0122 === ================================
0123
0124 '0' means the device link can affect other device behaviors
0125 like binding/unbinding, suspend/resume, runtime power
0126 management, etc.
0127
0128 '1' means the device link will only affect the syncing of
0129 hardware and software state of the supplier device after boot
0130 up and doesn't not affect other behaviors of the devices.