aboutsummaryrefslogtreecommitdiff
path: root/Documentation/ABI/testing/sysfs-class-devlink
blob: 8a21ce515f61fb2cf6680508c15445fcb4c1991e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
What:		/sys/class/devlink/.../
Date:		May 2020
Contact:	Saravana Kannan <saravanak@google.com>
Description:
		Provide a place in sysfs for the device link objects in the
		kernel at any given time.  The name of a device link directory,
		denoted as ... above, is of the form <supplier>--<consumer>
		where <supplier> is the supplier bus:device name and <consumer>
		is the consumer bus:device name.

What:		/sys/class/devlink/.../auto_remove_on
Date:		May 2020
Contact:	Saravana Kannan <saravanak@google.com>
Description:
		This file indicates if the device link will ever be
		automatically removed by the driver core when the consumer and
		supplier devices themselves are still present.

		This will be one of the following strings:

		- 'consumer unbind'
		- 'supplier unbind'
		- 'never'

		'consumer unbind' means the device link will be removed when
		the consumer's driver is unbound from the consumer device.

		'supplier unbind' means the device link will be removed when
		the supplier's driver is unbound from the supplier device.

		'never' means the device link will not be automatically removed
		when as long as the supplier and consumer devices themselves
		are still present.

What:		/sys/class/devlink/.../consumer
Date:		May 2020
Contact:	Saravana Kannan <saravanak@google.com>
Description:
		This file is a symlink to the consumer device's sysfs directory.

What:		/sys/class/devlink/.../runtime_pm
Date:		May 2020
Contact:	Saravana Kannan <saravanak@google.com>
Description:
		This file indicates if the device link has any impact on the
		runtime power management behavior of the consumer and supplier
		devices. For example: Making sure the supplier doesn't enter
		runtime suspend while the consumer is active.

		This will be one of the following strings:

		===   ========================================
		'0'   Does not affect runtime power management
		'1'   Affects runtime power management
		===   ========================================

What:		/sys/class/devlink/.../status
Date:		May 2020
Contact:	Saravana Kannan <saravanak@google.com>
Description:
		This file indicates the status of the device link. The status
		of a device link is affected by whether the supplier and
		consumer devices have been bound to their corresponding
		drivers. The status of a device link also affects the binding
		and unbinding of the supplier and consumer devices with their
		drivers and also affects whether the software state of the
		supplier device is synced with the hardware state of the
		supplier device after boot up.
		See also: sysfs-devices-state_synced.

		This will be one of the following strings:

		- 'not tracked'
		- 'dormant'
		- 'available'
		- 'consumer probing'
		- 'active'
		- 'supplier unbinding'
		- 'unknown'

		'not tracked' means this device link does not track the status
		and has no impact on the binding, unbinding and syncing the
		hardware and software device state.

		'dormant' means the supplier and the consumer devices have not
		bound to their driver.

		'available' means the supplier has bound to its driver and is
		available to supply resources to the consumer device.

		'consumer probing' means the consumer device is currently
		trying to bind to its driver.

		'active' means the supplier and consumer devices have both
		bound successfully to their drivers.

		'supplier unbinding' means the supplier devices is currently in
		the process of unbinding from its driver.

		'unknown' means the state of the device link is not any of the
		above. If this is ever the value, there's a bug in the kernel.

What:		/sys/class/devlink/.../supplier
Date:		May 2020
Contact:	Saravana Kannan <saravanak@google.com>
Description:
		This file is a symlink to the supplier device's sysfs directory.

What:		/sys/class/devlink/.../sync_state_only
Date:		May 2020
Contact:	Saravana Kannan <saravanak@google.com>
Description:
		This file indicates if the device link is limited to only
		affecting the syncing of the hardware and software state of the
		supplier device.

		This will be one of the following strings:

		===  ================================
		'0'
		'1'  Affects runtime power management
		===  ================================

		'0' means the device link can affect other device behaviors
		like binding/unbinding, suspend/resume, runtime power
		management, etc.

		'1' means the device link will only affect the syncing of
		hardware and software state of the supplier device after boot
		up and doesn't not affect other behaviors of the devices.