hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/Documentation/ABI/testing/sysfs-bus-usb
....@@ -9,6 +9,7 @@
99 by writing INTERFACE to /sys/bus/usb/drivers_probe
1010 This allows to avoid side-effects with drivers
1111 that need multiple interfaces.
12
+
1213 A deauthorized interface cannot be probed or claimed.
1314
1415 What: /sys/bus/usb/devices/usbX/interface_authorized_default
....@@ -72,24 +73,27 @@
7273 table at compile time. The format for the device ID is:
7374 idVendor idProduct bInterfaceClass RefIdVendor RefIdProduct
7475 The vendor ID and device ID fields are required, the
75
- rest is optional. The Ref* tuple can be used to tell the
76
+ rest is optional. The `Ref*` tuple can be used to tell the
7677 driver to use the same driver_data for the new device as
7778 it is used for the reference device.
7879 Upon successfully adding an ID, the driver will probe
79
- for the device and attempt to bind to it. For example:
80
- # echo "8086 10f5" > /sys/bus/usb/drivers/foo/new_id
80
+ for the device and attempt to bind to it. For example::
81
+
82
+ # echo "8086 10f5" > /sys/bus/usb/drivers/foo/new_id
8183
8284 Here add a new device (0458:7045) using driver_data from
83
- an already supported device (0458:704c):
84
- # echo "0458 7045 0 0458 704c" > /sys/bus/usb/drivers/foo/new_id
85
+ an already supported device (0458:704c)::
86
+
87
+ # echo "0458 7045 0 0458 704c" > /sys/bus/usb/drivers/foo/new_id
8588
8689 Reading from this file will list all dynamically added
8790 device IDs in the same format, with one entry per
88
- line. For example:
89
- # cat /sys/bus/usb/drivers/foo/new_id
90
- 8086 10f5
91
- dead beef 06
92
- f00d cafe
91
+ line. For example::
92
+
93
+ # cat /sys/bus/usb/drivers/foo/new_id
94
+ 8086 10f5
95
+ dead beef 06
96
+ f00d cafe
9397
9498 The list will be truncated at PAGE_SIZE bytes due to
9599 sysfs restrictions.
....@@ -186,8 +190,18 @@
186190 Description:
187191 Some platforms provide usb port connect types through ACPI.
188192 This attribute is to expose these information to user space.
189
- The file will read "hotplug", "wired" and "not used" if the
193
+ The file will read "hotplug", "hardwired" and "not used" if the
190194 information is available, and "unknown" otherwise.
195
+
196
+What: /sys/bus/usb/devices/.../(hub interface)/portX/location
197
+Date: October 2018
198
+Contact: Bjørn Mork <bjorn@mork.no>
199
+Description:
200
+ Some platforms provide usb port physical location through
201
+ firmware. This is used by the kernel to pair up logical ports
202
+ mapping to the same physical connector. The attribute exposes the
203
+ raw location value as a hex integer.
204
+
191205
192206 What: /sys/bus/usb/devices/.../(hub interface)/portX/quirks
193207 Date: May 2018
....@@ -199,9 +213,11 @@
199213 advance, and behaves well according to the specification.
200214 This attribute is a bit-field that controls the behavior of
201215 a specific port:
216
+
202217 - Bit 0 of this field selects the "old" enumeration scheme,
203218 as it is considerably faster (it only causes one USB reset
204219 instead of 2).
220
+
205221 The old enumeration scheme can also be selected globally
206222 using /sys/module/usbcore/parameters/old_scheme_first, but
207223 it is often not desirable as the new scheme was introduced to
....@@ -219,7 +235,14 @@
219235 ports and report them to the kernel. This attribute is to expose
220236 the number of over-current situation occurred on a specific port
221237 to user space. This file will contain an unsigned 32 bit value
222
- which wraps to 0 after its maximum is reached.
238
+ which wraps to 0 after its maximum is reached. This file supports
239
+ poll() for monitoring changes to this value in user space.
240
+
241
+ Any time this value changes the corresponding hub device will send a
242
+ udev event with the following attributes::
243
+
244
+ OVER_CURRENT_PORT=/sys/bus/usb/devices/.../(hub interface)/portX
245
+ OVER_CURRENT_COUNT=[current value of this sysfs attribute]
223246
224247 What: /sys/bus/usb/devices/.../(hub interface)/portX/usb3_lpm_permit
225248 Date: November 2015