.. | .. |
---|
9 | 9 | by writing INTERFACE to /sys/bus/usb/drivers_probe |
---|
10 | 10 | This allows to avoid side-effects with drivers |
---|
11 | 11 | that need multiple interfaces. |
---|
| 12 | + |
---|
12 | 13 | A deauthorized interface cannot be probed or claimed. |
---|
13 | 14 | |
---|
14 | 15 | What: /sys/bus/usb/devices/usbX/interface_authorized_default |
---|
.. | .. |
---|
72 | 73 | table at compile time. The format for the device ID is: |
---|
73 | 74 | idVendor idProduct bInterfaceClass RefIdVendor RefIdProduct |
---|
74 | 75 | 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 |
---|
76 | 77 | driver to use the same driver_data for the new device as |
---|
77 | 78 | it is used for the reference device. |
---|
78 | 79 | 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 |
---|
81 | 83 | |
---|
82 | 84 | 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 |
---|
85 | 88 | |
---|
86 | 89 | Reading from this file will list all dynamically added |
---|
87 | 90 | 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 |
---|
93 | 97 | |
---|
94 | 98 | The list will be truncated at PAGE_SIZE bytes due to |
---|
95 | 99 | sysfs restrictions. |
---|
.. | .. |
---|
186 | 190 | Description: |
---|
187 | 191 | Some platforms provide usb port connect types through ACPI. |
---|
188 | 192 | 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 |
---|
190 | 194 | 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 | + |
---|
191 | 205 | |
---|
192 | 206 | What: /sys/bus/usb/devices/.../(hub interface)/portX/quirks |
---|
193 | 207 | Date: May 2018 |
---|
.. | .. |
---|
199 | 213 | advance, and behaves well according to the specification. |
---|
200 | 214 | This attribute is a bit-field that controls the behavior of |
---|
201 | 215 | a specific port: |
---|
| 216 | + |
---|
202 | 217 | - Bit 0 of this field selects the "old" enumeration scheme, |
---|
203 | 218 | as it is considerably faster (it only causes one USB reset |
---|
204 | 219 | instead of 2). |
---|
| 220 | + |
---|
205 | 221 | The old enumeration scheme can also be selected globally |
---|
206 | 222 | using /sys/module/usbcore/parameters/old_scheme_first, but |
---|
207 | 223 | it is often not desirable as the new scheme was introduced to |
---|
.. | .. |
---|
219 | 235 | ports and report them to the kernel. This attribute is to expose |
---|
220 | 236 | the number of over-current situation occurred on a specific port |
---|
221 | 237 | 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] |
---|
223 | 246 | |
---|
224 | 247 | What: /sys/bus/usb/devices/.../(hub interface)/portX/usb3_lpm_permit |
---|
225 | 248 | Date: November 2015 |
---|