xref: /linux/Documentation/ABI/testing/sysfs-class-devlink (revision 90b109d50da09ddaa179732c01ccba7f759c125d)
1287905e6SSaravana KannanWhat:		/sys/class/devlink/.../
2287905e6SSaravana KannanDate:		May 2020
3287905e6SSaravana KannanContact:	Saravana Kannan <saravanak@google.com>
4287905e6SSaravana KannanDescription:
5287905e6SSaravana Kannan		Provide a place in sysfs for the device link objects in the
6287905e6SSaravana Kannan		kernel at any given time.  The name of a device link directory,
7*90b109d5SSaravana Kannan		denoted as ... above, is of the form <supplier>--<consumer>
8287905e6SSaravana Kannan		where <supplier> is the supplier device name and <consumer> is
9287905e6SSaravana Kannan		the consumer device name.
10287905e6SSaravana Kannan
11287905e6SSaravana KannanWhat:		/sys/class/devlink/.../auto_remove_on
12287905e6SSaravana KannanDate:		May 2020
13287905e6SSaravana KannanContact:	Saravana Kannan <saravanak@google.com>
14287905e6SSaravana KannanDescription:
15287905e6SSaravana Kannan		This file indicates if the device link will ever be
16287905e6SSaravana Kannan		automatically removed by the driver core when the consumer and
17287905e6SSaravana Kannan		supplier devices themselves are still present.
18287905e6SSaravana Kannan
19287905e6SSaravana Kannan		This will be one of the following strings:
20287905e6SSaravana Kannan
21287905e6SSaravana Kannan		'consumer unbind'
22287905e6SSaravana Kannan		'supplier unbind'
23287905e6SSaravana Kannan		'never'
24287905e6SSaravana Kannan
25287905e6SSaravana Kannan		'consumer unbind' means the device link will be removed when
26287905e6SSaravana Kannan		the consumer's driver is unbound from the consumer device.
27287905e6SSaravana Kannan
28287905e6SSaravana Kannan		'supplier unbind' means the device link will be removed when
29287905e6SSaravana Kannan		the supplier's driver is unbound from the supplier device.
30287905e6SSaravana Kannan
31287905e6SSaravana Kannan		'never' means the device link will not be automatically removed
32287905e6SSaravana Kannan		when as long as the supplier and consumer devices themselves
33287905e6SSaravana Kannan		are still present.
34287905e6SSaravana Kannan
35287905e6SSaravana KannanWhat:		/sys/class/devlink/.../consumer
36287905e6SSaravana KannanDate:		May 2020
37287905e6SSaravana KannanContact:	Saravana Kannan <saravanak@google.com>
38287905e6SSaravana KannanDescription:
39287905e6SSaravana Kannan		This file is a symlink to the consumer device's sysfs directory.
40287905e6SSaravana Kannan
41287905e6SSaravana KannanWhat:		/sys/class/devlink/.../runtime_pm
42287905e6SSaravana KannanDate:		May 2020
43287905e6SSaravana KannanContact:	Saravana Kannan <saravanak@google.com>
44287905e6SSaravana KannanDescription:
45287905e6SSaravana Kannan		This file indicates if the device link has any impact on the
46287905e6SSaravana Kannan		runtime power management behavior of the consumer and supplier
47287905e6SSaravana Kannan		devices. For example: Making sure the supplier doesn't enter
48287905e6SSaravana Kannan		runtime suspend while the consumer is active.
49287905e6SSaravana Kannan
50287905e6SSaravana Kannan		This will be one of the following strings:
51287905e6SSaravana Kannan
52287905e6SSaravana Kannan		'0' - Does not affect runtime power management
53287905e6SSaravana Kannan		'1' - Affects runtime power management
54287905e6SSaravana Kannan
55287905e6SSaravana KannanWhat:		/sys/class/devlink/.../status
56287905e6SSaravana KannanDate:		May 2020
57287905e6SSaravana KannanContact:	Saravana Kannan <saravanak@google.com>
58287905e6SSaravana KannanDescription:
59287905e6SSaravana Kannan		This file indicates the status of the device link. The status
60287905e6SSaravana Kannan		of a device link is affected by whether the supplier and
61287905e6SSaravana Kannan		consumer devices have been bound to their corresponding
62287905e6SSaravana Kannan		drivers. The status of a device link also affects the binding
63287905e6SSaravana Kannan		and unbinding of the supplier and consumer devices with their
64287905e6SSaravana Kannan		drivers and also affects whether the software state of the
65287905e6SSaravana Kannan		supplier device is synced with the hardware state of the
66287905e6SSaravana Kannan		supplier device after boot up.
67287905e6SSaravana Kannan		See also: sysfs-devices-state_synced.
68287905e6SSaravana Kannan
69287905e6SSaravana Kannan		This will be one of the following strings:
70287905e6SSaravana Kannan
71287905e6SSaravana Kannan		'not tracked'
72287905e6SSaravana Kannan		'dormant'
73287905e6SSaravana Kannan		'available'
74287905e6SSaravana Kannan		'consumer probing'
75287905e6SSaravana Kannan		'active'
76287905e6SSaravana Kannan		'supplier unbinding'
77287905e6SSaravana Kannan		'unknown'
78287905e6SSaravana Kannan
79287905e6SSaravana Kannan		'not tracked' means this device link does not track the status
80287905e6SSaravana Kannan		and has no impact on the binding, unbinding and syncing the
81287905e6SSaravana Kannan		hardware and software device state.
82287905e6SSaravana Kannan
83287905e6SSaravana Kannan		'dormant' means the supplier and the consumer devices have not
84287905e6SSaravana Kannan		bound to their driver.
85287905e6SSaravana Kannan
86287905e6SSaravana Kannan		'available' means the supplier has bound to its driver and is
87287905e6SSaravana Kannan		available to supply resources to the consumer device.
88287905e6SSaravana Kannan
89287905e6SSaravana Kannan		'consumer probing' means the consumer device is currently
90287905e6SSaravana Kannan		trying to bind to its driver.
91287905e6SSaravana Kannan
92287905e6SSaravana Kannan		'active' means the supplier and consumer devices have both
93287905e6SSaravana Kannan		bound successfully to their drivers.
94287905e6SSaravana Kannan
95287905e6SSaravana Kannan		'supplier unbinding' means the supplier devices is currently in
96287905e6SSaravana Kannan		the process of unbinding from its driver.
97287905e6SSaravana Kannan
98287905e6SSaravana Kannan		'unknown' means the state of the device link is not any of the
99287905e6SSaravana Kannan		above. If this is ever the value, there's a bug in the kernel.
100287905e6SSaravana Kannan
101287905e6SSaravana KannanWhat:		/sys/class/devlink/.../supplier
102287905e6SSaravana KannanDate:		May 2020
103287905e6SSaravana KannanContact:	Saravana Kannan <saravanak@google.com>
104287905e6SSaravana KannanDescription:
105287905e6SSaravana Kannan		This file is a symlink to the supplier device's sysfs directory.
106287905e6SSaravana Kannan
107287905e6SSaravana KannanWhat:		/sys/class/devlink/.../sync_state_only
108287905e6SSaravana KannanDate:		May 2020
109287905e6SSaravana KannanContact:	Saravana Kannan <saravanak@google.com>
110287905e6SSaravana KannanDescription:
111287905e6SSaravana Kannan		This file indicates if the device link is limited to only
112287905e6SSaravana Kannan		affecting the syncing of the hardware and software state of the
113287905e6SSaravana Kannan		supplier device.
114287905e6SSaravana Kannan
115287905e6SSaravana Kannan		This will be one of the following strings:
116287905e6SSaravana Kannan
117287905e6SSaravana Kannan		'0'
118287905e6SSaravana Kannan		'1' - Affects runtime power management
119287905e6SSaravana Kannan
120287905e6SSaravana Kannan		'0' means the device link can affect other device behaviors
121287905e6SSaravana Kannan		like binding/unbinding, suspend/resume, runtime power
122287905e6SSaravana Kannan		management, etc.
123287905e6SSaravana Kannan
124287905e6SSaravana Kannan		'1' means the device link will only affect the syncing of
125287905e6SSaravana Kannan		hardware and software state of the supplier device after boot
126287905e6SSaravana Kannan		up and doesn't not affect other behaviors of the devices.
127