xref: /OK3568_Linux_fs/kernel/Documentation/ABI/testing/sysfs-class-devlink (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunWhat:		/sys/class/devlink/.../
2*4882a593SmuzhiyunDate:		May 2020
3*4882a593SmuzhiyunContact:	Saravana Kannan <saravanak@google.com>
4*4882a593SmuzhiyunDescription:
5*4882a593Smuzhiyun		Provide a place in sysfs for the device link objects in the
6*4882a593Smuzhiyun		kernel at any given time.  The name of a device link directory,
7*4882a593Smuzhiyun		denoted as ... above, is of the form <supplier>--<consumer>
8*4882a593Smuzhiyun		where <supplier> is the supplier bus:device name and <consumer>
9*4882a593Smuzhiyun		is the consumer bus:device name.
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunWhat:		/sys/class/devlink/.../auto_remove_on
12*4882a593SmuzhiyunDate:		May 2020
13*4882a593SmuzhiyunContact:	Saravana Kannan <saravanak@google.com>
14*4882a593SmuzhiyunDescription:
15*4882a593Smuzhiyun		This file indicates if the device link will ever be
16*4882a593Smuzhiyun		automatically removed by the driver core when the consumer and
17*4882a593Smuzhiyun		supplier devices themselves are still present.
18*4882a593Smuzhiyun
19*4882a593Smuzhiyun		This will be one of the following strings:
20*4882a593Smuzhiyun
21*4882a593Smuzhiyun		- 'consumer unbind'
22*4882a593Smuzhiyun		- 'supplier unbind'
23*4882a593Smuzhiyun		- 'never'
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun		'consumer unbind' means the device link will be removed when
26*4882a593Smuzhiyun		the consumer's driver is unbound from the consumer device.
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun		'supplier unbind' means the device link will be removed when
29*4882a593Smuzhiyun		the supplier's driver is unbound from the supplier device.
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun		'never' means the device link will not be automatically removed
32*4882a593Smuzhiyun		when as long as the supplier and consumer devices themselves
33*4882a593Smuzhiyun		are still present.
34*4882a593Smuzhiyun
35*4882a593SmuzhiyunWhat:		/sys/class/devlink/.../consumer
36*4882a593SmuzhiyunDate:		May 2020
37*4882a593SmuzhiyunContact:	Saravana Kannan <saravanak@google.com>
38*4882a593SmuzhiyunDescription:
39*4882a593Smuzhiyun		This file is a symlink to the consumer device's sysfs directory.
40*4882a593Smuzhiyun
41*4882a593SmuzhiyunWhat:		/sys/class/devlink/.../runtime_pm
42*4882a593SmuzhiyunDate:		May 2020
43*4882a593SmuzhiyunContact:	Saravana Kannan <saravanak@google.com>
44*4882a593SmuzhiyunDescription:
45*4882a593Smuzhiyun		This file indicates if the device link has any impact on the
46*4882a593Smuzhiyun		runtime power management behavior of the consumer and supplier
47*4882a593Smuzhiyun		devices. For example: Making sure the supplier doesn't enter
48*4882a593Smuzhiyun		runtime suspend while the consumer is active.
49*4882a593Smuzhiyun
50*4882a593Smuzhiyun		This will be one of the following strings:
51*4882a593Smuzhiyun
52*4882a593Smuzhiyun		===   ========================================
53*4882a593Smuzhiyun		'0'   Does not affect runtime power management
54*4882a593Smuzhiyun		'1'   Affects runtime power management
55*4882a593Smuzhiyun		===   ========================================
56*4882a593Smuzhiyun
57*4882a593SmuzhiyunWhat:		/sys/class/devlink/.../status
58*4882a593SmuzhiyunDate:		May 2020
59*4882a593SmuzhiyunContact:	Saravana Kannan <saravanak@google.com>
60*4882a593SmuzhiyunDescription:
61*4882a593Smuzhiyun		This file indicates the status of the device link. The status
62*4882a593Smuzhiyun		of a device link is affected by whether the supplier and
63*4882a593Smuzhiyun		consumer devices have been bound to their corresponding
64*4882a593Smuzhiyun		drivers. The status of a device link also affects the binding
65*4882a593Smuzhiyun		and unbinding of the supplier and consumer devices with their
66*4882a593Smuzhiyun		drivers and also affects whether the software state of the
67*4882a593Smuzhiyun		supplier device is synced with the hardware state of the
68*4882a593Smuzhiyun		supplier device after boot up.
69*4882a593Smuzhiyun		See also: sysfs-devices-state_synced.
70*4882a593Smuzhiyun
71*4882a593Smuzhiyun		This will be one of the following strings:
72*4882a593Smuzhiyun
73*4882a593Smuzhiyun		- 'not tracked'
74*4882a593Smuzhiyun		- 'dormant'
75*4882a593Smuzhiyun		- 'available'
76*4882a593Smuzhiyun		- 'consumer probing'
77*4882a593Smuzhiyun		- 'active'
78*4882a593Smuzhiyun		- 'supplier unbinding'
79*4882a593Smuzhiyun		- 'unknown'
80*4882a593Smuzhiyun
81*4882a593Smuzhiyun		'not tracked' means this device link does not track the status
82*4882a593Smuzhiyun		and has no impact on the binding, unbinding and syncing the
83*4882a593Smuzhiyun		hardware and software device state.
84*4882a593Smuzhiyun
85*4882a593Smuzhiyun		'dormant' means the supplier and the consumer devices have not
86*4882a593Smuzhiyun		bound to their driver.
87*4882a593Smuzhiyun
88*4882a593Smuzhiyun		'available' means the supplier has bound to its driver and is
89*4882a593Smuzhiyun		available to supply resources to the consumer device.
90*4882a593Smuzhiyun
91*4882a593Smuzhiyun		'consumer probing' means the consumer device is currently
92*4882a593Smuzhiyun		trying to bind to its driver.
93*4882a593Smuzhiyun
94*4882a593Smuzhiyun		'active' means the supplier and consumer devices have both
95*4882a593Smuzhiyun		bound successfully to their drivers.
96*4882a593Smuzhiyun
97*4882a593Smuzhiyun		'supplier unbinding' means the supplier devices is currently in
98*4882a593Smuzhiyun		the process of unbinding from its driver.
99*4882a593Smuzhiyun
100*4882a593Smuzhiyun		'unknown' means the state of the device link is not any of the
101*4882a593Smuzhiyun		above. If this is ever the value, there's a bug in the kernel.
102*4882a593Smuzhiyun
103*4882a593SmuzhiyunWhat:		/sys/class/devlink/.../supplier
104*4882a593SmuzhiyunDate:		May 2020
105*4882a593SmuzhiyunContact:	Saravana Kannan <saravanak@google.com>
106*4882a593SmuzhiyunDescription:
107*4882a593Smuzhiyun		This file is a symlink to the supplier device's sysfs directory.
108*4882a593Smuzhiyun
109*4882a593SmuzhiyunWhat:		/sys/class/devlink/.../sync_state_only
110*4882a593SmuzhiyunDate:		May 2020
111*4882a593SmuzhiyunContact:	Saravana Kannan <saravanak@google.com>
112*4882a593SmuzhiyunDescription:
113*4882a593Smuzhiyun		This file indicates if the device link is limited to only
114*4882a593Smuzhiyun		affecting the syncing of the hardware and software state of the
115*4882a593Smuzhiyun		supplier device.
116*4882a593Smuzhiyun
117*4882a593Smuzhiyun		This will be one of the following strings:
118*4882a593Smuzhiyun
119*4882a593Smuzhiyun		===  ================================
120*4882a593Smuzhiyun		'0'
121*4882a593Smuzhiyun		'1'  Affects runtime power management
122*4882a593Smuzhiyun		===  ================================
123*4882a593Smuzhiyun
124*4882a593Smuzhiyun		'0' means the device link can affect other device behaviors
125*4882a593Smuzhiyun		like binding/unbinding, suspend/resume, runtime power
126*4882a593Smuzhiyun		management, etc.
127*4882a593Smuzhiyun
128*4882a593Smuzhiyun		'1' means the device link will only affect the syncing of
129*4882a593Smuzhiyun		hardware and software state of the supplier device after boot
130*4882a593Smuzhiyun		up and doesn't not affect other behaviors of the devices.
131