162306a36Sopenharmony_ciWhat: /sys/class/devlink/.../ 262306a36Sopenharmony_ciDate: May 2020 362306a36Sopenharmony_ciContact: Saravana Kannan <saravanak@google.com> 462306a36Sopenharmony_ciDescription: 562306a36Sopenharmony_ci Provide a place in sysfs for the device link objects in the 662306a36Sopenharmony_ci kernel at any given time. The name of a device link directory, 762306a36Sopenharmony_ci denoted as ... above, is of the form <supplier>--<consumer> 862306a36Sopenharmony_ci where <supplier> is the supplier bus:device name and <consumer> 962306a36Sopenharmony_ci is the consumer bus:device name. 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ciWhat: /sys/class/devlink/.../auto_remove_on 1262306a36Sopenharmony_ciDate: May 2020 1362306a36Sopenharmony_ciContact: Saravana Kannan <saravanak@google.com> 1462306a36Sopenharmony_ciDescription: 1562306a36Sopenharmony_ci This file indicates if the device link will ever be 1662306a36Sopenharmony_ci automatically removed by the driver core when the consumer and 1762306a36Sopenharmony_ci supplier devices themselves are still present. 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci This will be one of the following strings: 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ci - 'consumer unbind' 2262306a36Sopenharmony_ci - 'supplier unbind' 2362306a36Sopenharmony_ci - 'never' 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci 'consumer unbind' means the device link will be removed when 2662306a36Sopenharmony_ci the consumer's driver is unbound from the consumer device. 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci 'supplier unbind' means the device link will be removed when 2962306a36Sopenharmony_ci the supplier's driver is unbound from the supplier device. 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci 'never' means the device link will not be automatically removed 3262306a36Sopenharmony_ci when as long as the supplier and consumer devices themselves 3362306a36Sopenharmony_ci are still present. 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ciWhat: /sys/class/devlink/.../consumer 3662306a36Sopenharmony_ciDate: May 2020 3762306a36Sopenharmony_ciContact: Saravana Kannan <saravanak@google.com> 3862306a36Sopenharmony_ciDescription: 3962306a36Sopenharmony_ci This file is a symlink to the consumer device's sysfs directory. 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ciWhat: /sys/class/devlink/.../runtime_pm 4262306a36Sopenharmony_ciDate: May 2020 4362306a36Sopenharmony_ciContact: Saravana Kannan <saravanak@google.com> 4462306a36Sopenharmony_ciDescription: 4562306a36Sopenharmony_ci This file indicates if the device link has any impact on the 4662306a36Sopenharmony_ci runtime power management behavior of the consumer and supplier 4762306a36Sopenharmony_ci devices. For example: Making sure the supplier doesn't enter 4862306a36Sopenharmony_ci runtime suspend while the consumer is active. 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci This will be one of the following strings: 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ci === ======================================== 5362306a36Sopenharmony_ci '0' Does not affect runtime power management 5462306a36Sopenharmony_ci '1' Affects runtime power management 5562306a36Sopenharmony_ci === ======================================== 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ciWhat: /sys/class/devlink/.../status 5862306a36Sopenharmony_ciDate: May 2020 5962306a36Sopenharmony_ciContact: Saravana Kannan <saravanak@google.com> 6062306a36Sopenharmony_ciDescription: 6162306a36Sopenharmony_ci This file indicates the status of the device link. The status 6262306a36Sopenharmony_ci of a device link is affected by whether the supplier and 6362306a36Sopenharmony_ci consumer devices have been bound to their corresponding 6462306a36Sopenharmony_ci drivers. The status of a device link also affects the binding 6562306a36Sopenharmony_ci and unbinding of the supplier and consumer devices with their 6662306a36Sopenharmony_ci drivers and also affects whether the software state of the 6762306a36Sopenharmony_ci supplier device is synced with the hardware state of the 6862306a36Sopenharmony_ci supplier device after boot up. 6962306a36Sopenharmony_ci See also: sysfs-devices-state_synced. 7062306a36Sopenharmony_ci 7162306a36Sopenharmony_ci This will be one of the following strings: 7262306a36Sopenharmony_ci 7362306a36Sopenharmony_ci - 'not tracked' 7462306a36Sopenharmony_ci - 'dormant' 7562306a36Sopenharmony_ci - 'available' 7662306a36Sopenharmony_ci - 'consumer probing' 7762306a36Sopenharmony_ci - 'active' 7862306a36Sopenharmony_ci - 'supplier unbinding' 7962306a36Sopenharmony_ci - 'unknown' 8062306a36Sopenharmony_ci 8162306a36Sopenharmony_ci 'not tracked' means this device link does not track the status 8262306a36Sopenharmony_ci and has no impact on the binding, unbinding and syncing the 8362306a36Sopenharmony_ci hardware and software device state. 8462306a36Sopenharmony_ci 8562306a36Sopenharmony_ci 'dormant' means the supplier and the consumer devices have not 8662306a36Sopenharmony_ci bound to their driver. 8762306a36Sopenharmony_ci 8862306a36Sopenharmony_ci 'available' means the supplier has bound to its driver and is 8962306a36Sopenharmony_ci available to supply resources to the consumer device. 9062306a36Sopenharmony_ci 9162306a36Sopenharmony_ci 'consumer probing' means the consumer device is currently 9262306a36Sopenharmony_ci trying to bind to its driver. 9362306a36Sopenharmony_ci 9462306a36Sopenharmony_ci 'active' means the supplier and consumer devices have both 9562306a36Sopenharmony_ci bound successfully to their drivers. 9662306a36Sopenharmony_ci 9762306a36Sopenharmony_ci 'supplier unbinding' means the supplier devices is currently in 9862306a36Sopenharmony_ci the process of unbinding from its driver. 9962306a36Sopenharmony_ci 10062306a36Sopenharmony_ci 'unknown' means the state of the device link is not any of the 10162306a36Sopenharmony_ci above. If this is ever the value, there's a bug in the kernel. 10262306a36Sopenharmony_ci 10362306a36Sopenharmony_ciWhat: /sys/class/devlink/.../supplier 10462306a36Sopenharmony_ciDate: May 2020 10562306a36Sopenharmony_ciContact: Saravana Kannan <saravanak@google.com> 10662306a36Sopenharmony_ciDescription: 10762306a36Sopenharmony_ci This file is a symlink to the supplier device's sysfs directory. 10862306a36Sopenharmony_ci 10962306a36Sopenharmony_ciWhat: /sys/class/devlink/.../sync_state_only 11062306a36Sopenharmony_ciDate: May 2020 11162306a36Sopenharmony_ciContact: Saravana Kannan <saravanak@google.com> 11262306a36Sopenharmony_ciDescription: 11362306a36Sopenharmony_ci This file indicates if the device link is limited to only 11462306a36Sopenharmony_ci affecting the syncing of the hardware and software state of the 11562306a36Sopenharmony_ci supplier device. 11662306a36Sopenharmony_ci 11762306a36Sopenharmony_ci This will be one of the following strings: 11862306a36Sopenharmony_ci 11962306a36Sopenharmony_ci === ================================ 12062306a36Sopenharmony_ci '0' 12162306a36Sopenharmony_ci '1' Affects runtime power management 12262306a36Sopenharmony_ci === ================================ 12362306a36Sopenharmony_ci 12462306a36Sopenharmony_ci '0' means the device link can affect other device behaviors 12562306a36Sopenharmony_ci like binding/unbinding, suspend/resume, runtime power 12662306a36Sopenharmony_ci management, etc. 12762306a36Sopenharmony_ci 12862306a36Sopenharmony_ci '1' means the device link will only affect the syncing of 12962306a36Sopenharmony_ci hardware and software state of the supplier device after boot 13062306a36Sopenharmony_ci up and doesn't not affect other behaviors of the devices. 131