blob: b6fbe514a869a311bea16c1918061128c8f9d6dc [file] [log] [blame]
Alan Sterneaafbc32007-03-13 16:39:15 -04001What: /sys/bus/usb/devices/.../power/autosuspend
2Date: March 2007
3KernelVersion: 2.6.21
4Contact: Alan Stern <stern@rowland.harvard.edu>
5Description:
6 Each USB device directory will contain a file named
7 power/autosuspend. This file holds the time (in seconds)
8 the device must be idle before it will be autosuspended.
9 0 means the device will be autosuspended as soon as
10 possible. Negative values will prevent the device from
11 being autosuspended at all, and writing a negative value
12 will resume the device if it is already suspended.
13
14 The autosuspend delay for newly-created devices is set to
15 the value of the usbcore.autosuspend module parameter.
Alan Stern2add5222007-03-20 14:59:39 -040016
Alan Sternb41a60e2007-05-30 15:39:33 -040017What: /sys/bus/usb/devices/.../power/persist
18Date: May 2007
19KernelVersion: 2.6.23
20Contact: Alan Stern <stern@rowland.harvard.edu>
21Description:
22 If CONFIG_USB_PERSIST is set, then each USB device directory
23 will contain a file named power/persist. The file holds a
24 boolean value (0 or 1) indicating whether or not the
25 "USB-Persist" facility is enabled for the device. Since the
26 facility is inherently dangerous, it is disabled by default
27 for all devices except hubs. For more information, see
28 Documentation/usb/persist.txt.
Sarah Sharp979e5242008-01-17 10:24:38 -080029
30What: /sys/bus/usb/device/.../power/connected_duration
31Date: January 2008
32KernelVersion: 2.6.25
33Contact: Sarah Sharp <sarah.a.sharp@intel.com>
34Description:
35 If CONFIG_PM and CONFIG_USB_SUSPEND are enabled, then this file
36 is present. When read, it returns the total time (in msec)
37 that the USB device has been connected to the machine. This
38 file is read-only.
39Users:
40 PowerTOP <power@bughost.org>
41 http://www.lesswatts.org/projects/powertop/
42
43What: /sys/bus/usb/device/.../power/active_duration
44Date: January 2008
45KernelVersion: 2.6.25
46Contact: Sarah Sharp <sarah.a.sharp@intel.com>
47Description:
48 If CONFIG_PM and CONFIG_USB_SUSPEND are enabled, then this file
49 is present. When read, it returns the total time (in msec)
50 that the USB device has been active, i.e. not in a suspended
51 state. This file is read-only.
52
53 Tools can use this file and the connected_duration file to
54 compute the percentage of time that a device has been active.
55 For example,
56 echo $((100 * `cat active_duration` / `cat connected_duration`))
57 will give an integer percentage. Note that this does not
58 account for counter wrap.
59Users:
60 PowerTOP <power@bughost.org>
61 http://www.lesswatts.org/projects/powertop/
David Vrabelc8cf2462008-09-17 16:34:41 +010062
Sarah Sharp49e7cc82008-10-06 14:45:46 -070063What: /sys/bus/usb/device/<busnum>-<devnum>...:<config num>-<interface num>/supports_autosuspend
64Date: January 2008
65KernelVersion: 2.6.27
66Contact: Sarah Sharp <sarah.a.sharp@intel.com>
67Description:
68 When read, this file returns 1 if the interface driver
69 for this interface supports autosuspend. It also
70 returns 1 if no driver has claimed this interface, as an
71 unclaimed interface will not stop the device from being
72 autosuspended if all other interface drivers are idle.
73 The file returns 0 if autosuspend support has not been
74 added to the driver.
75Users:
76 USB PM tool
77 git://git.moblin.org/users/sarah/usb-pm-tool/
David Vrabel61e0e792008-10-20 16:07:19 +010078
David Vrabelc8cf2462008-09-17 16:34:41 +010079What: /sys/bus/usb/device/.../authorized
80Date: July 2008
81KernelVersion: 2.6.26
82Contact: David Vrabel <david.vrabel@csr.com>
83Description:
84 Authorized devices are available for use by device
85 drivers, non-authorized one are not. By default, wired
86 USB devices are authorized.
87
88 Certified Wireless USB devices are not authorized
89 initially and should be (by writing 1) after the
90 device has been authenticated.
91
92What: /sys/bus/usb/device/.../wusb_cdid
93Date: July 2008
94KernelVersion: 2.6.27
95Contact: David Vrabel <david.vrabel@csr.com>
96Description:
97 For Certified Wireless USB devices only.
98
99 A devices's CDID, as 16 space-separated hex octets.
100
101What: /sys/bus/usb/device/.../wusb_ck
102Date: July 2008
103KernelVersion: 2.6.27
104Contact: David Vrabel <david.vrabel@csr.com>
105Description:
106 For Certified Wireless USB devices only.
107
108 Write the device's connection key (CK) to start the
109 authentication of the device. The CK is 16
110 space-separated hex octets.
111
112What: /sys/bus/usb/device/.../wusb_disconnect
113Date: July 2008
114KernelVersion: 2.6.27
115Contact: David Vrabel <david.vrabel@csr.com>
116Description:
117 For Certified Wireless USB devices only.
118
119 Write a 1 to force the device to disconnect
120 (equivalent to unplugging a wired USB device).
CHENG Renquan0c7a2b72009-11-22 01:28:52 +0800121
Josua Dietzeff231db2011-10-23 14:22:29 +0200122What: /sys/bus/usb/drivers/.../new_id
123Date: October 2011
124Contact: linux-usb@vger.kernel.org
125Description:
126 Writing a device ID to this file will attempt to
127 dynamically add a new device ID to a USB device driver.
128 This may allow the driver to support more hardware than
129 was included in the driver's static device ID support
130 table at compile time. The format for the device ID is:
131 idVendor idProduct bInterfaceClass.
132 The vendor ID and device ID fields are required, the
133 interface class is optional.
134 Upon successfully adding an ID, the driver will probe
135 for the device and attempt to bind to it. For example:
136 # echo "8086 10f5" > /sys/bus/usb/drivers/foo/new_id
137
Bjørn Morke6bbcef2012-05-13 12:34:59 +0200138 Reading from this file will list all dynamically added
139 device IDs in the same format, with one entry per
140 line. For example:
141 # cat /sys/bus/usb/drivers/foo/new_id
142 8086 10f5
143 dead beef 06
144 f00d cafe
145
146 The list will be truncated at PAGE_SIZE bytes due to
147 sysfs restrictions.
148
Josua Dietzeff231db2011-10-23 14:22:29 +0200149What: /sys/bus/usb-serial/drivers/.../new_id
150Date: October 2011
151Contact: linux-usb@vger.kernel.org
152Description:
153 For serial USB drivers, this attribute appears under the
154 extra bus folder "usb-serial" in sysfs; apart from that
155 difference, all descriptions from the entry
156 "/sys/bus/usb/drivers/.../new_id" apply.
157
CHENG Renquan0c7a2b72009-11-22 01:28:52 +0800158What: /sys/bus/usb/drivers/.../remove_id
159Date: November 2009
160Contact: CHENG Renquan <rqcheng@smu.edu.sg>
161Description:
162 Writing a device ID to this file will remove an ID
163 that was dynamically added via the new_id sysfs entry.
164 The format for the device ID is:
165 idVendor idProduct. After successfully
166 removing an ID, the driver will no longer support the
167 device. This is useful to ensure auto probing won't
168 match the driver to the device. For example:
169 # echo "046d c315" > /sys/bus/usb/drivers/foo/remove_id
Oliver Neukumef955342010-01-16 01:33:03 +0100170
Bjørn Morke6bbcef2012-05-13 12:34:59 +0200171 Reading from this file will list the dynamically added
172 device IDs, exactly like reading from the entry
173 "/sys/bus/usb/drivers/.../new_id"
174
Oliver Neukum1e63ef02010-03-12 11:27:21 +0100175What: /sys/bus/usb/device/.../avoid_reset_quirk
Oliver Neukumef955342010-01-16 01:33:03 +0100176Date: December 2009
177Contact: Oliver Neukum <oliver@neukum.org>
178Description:
179 Writing 1 to this file tells the kernel that this
180 device will morph into another mode when it is reset.
181 Drivers will not use reset for error handling for
182 such devices.
183Users:
184 usb_modeswitch
Andiry Xuc1045e82011-09-23 14:19:53 -0700185
186What: /sys/bus/usb/devices/.../power/usb2_hardware_lpm
187Date: September 2011
188Contact: Andiry Xu <andiry.xu@amd.com>
189Description:
190 If CONFIG_USB_SUSPEND is set and a USB 2.0 lpm-capable device
191 is plugged in to a xHCI host which support link PM, it will
192 perform a LPM test; if the test is passed and host supports
193 USB2 hardware LPM (xHCI 1.0 feature), USB2 hardware LPM will
194 be enabled for the device and the USB device directory will
195 contain a file named power/usb2_hardware_lpm. The file holds
196 a string value (enable or disable) indicating whether or not
197 USB2 hardware LPM is enabled for the device. Developer can
198 write y/Y/1 or n/N/0 to the file to enable/disable the
199 feature.
Matthew Garrett0846e7e2012-02-03 17:11:54 -0500200
201What: /sys/bus/usb/devices/.../removable
202Date: February 2012
203Contact: Matthew Garrett <mjg@redhat.com>
204Description:
205 Some information about whether a given USB device is
206 physically fixed to the platform can be inferred from a
Masanari Iidac94bed8e2012-04-10 00:22:13 +0900207 combination of hub descriptor bits and platform-specific data
Matthew Garrett0846e7e2012-02-03 17:11:54 -0500208 such as ACPI. This file will read either "removable" or
209 "fixed" if the information is available, and "unknown"
Masanari Iidac94bed8e2012-04-10 00:22:13 +0900210 otherwise.
Sarah Sharp024f1172012-07-05 17:17:24 -0700211
212What: /sys/bus/usb/devices/.../ltm_capable
213Date: July 2012
214Contact: Sarah Sharp <sarah.a.sharp@linux.intel.com>
215Description:
216 USB 3.0 devices may optionally support Latency Tolerance
217 Messaging (LTM). They indicate their support by setting a bit
218 in the bmAttributes field of their SuperSpeed BOS descriptors.
219 If that bit is set for the device, ltm_capable will read "yes".
220 If the device doesn't support LTM, the file will read "no".
221 The file will be present for all speeds of USB devices, and will
222 always read "no" for USB 1.1 and USB 2.0 devices.
Lan Tianyufa2a9562012-09-05 13:44:31 +0800223
224What: /sys/bus/usb/devices/.../(hub interface)/portX
225Date: August 2012
226Contact: Lan Tianyu <tianyu.lan@intel.com>
227Description:
228 The /sys/bus/usb/devices/.../(hub interface)/portX
229 is usb port device's sysfs directory.