/Documentation/ABI/testing/sysfs-bus-usb
#! | 172 lines | 152 code | 20 blank | 0 comment | 0 complexity | 6125c5d7e4ecf864ec09202cff8aaeac MD5 | raw file
Possible License(s): CC-BY-SA-3.0, GPL-2.0, LGPL-2.0, AGPL-1.0
1What: /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.
16
17What: /sys/bus/usb/devices/.../power/level
18Date: March 2007
19KernelVersion: 2.6.21
20Contact: Alan Stern <stern@rowland.harvard.edu>
21Description:
22 Each USB device directory will contain a file named
23 power/level. This file holds a power-level setting for
24 the device, either "on" or "auto".
25
26 "on" means that the device is not allowed to autosuspend,
27 although normal suspends for system sleep will still
28 be honored. "auto" means the device will autosuspend
29 and autoresume in the usual manner, according to the
30 capabilities of its driver.
31
32 During normal use, devices should be left in the "auto"
33 level. The "on" level is meant for administrative uses.
34 If you want to suspend a device immediately but leave it
35 free to wake up in response to I/O requests, you should
36 write "0" to power/autosuspend.
37
38 Device not capable of proper suspend and resume should be
39 left in the "on" level. Although the USB spec requires
40 devices to support suspend/resume, many of them do not.
41 In fact so many don't that by default, the USB core
42 initializes all non-hub devices in the "on" level. Some
43 drivers may change this setting when they are bound.
44
45What: /sys/bus/usb/devices/.../power/persist
46Date: May 2007
47KernelVersion: 2.6.23
48Contact: Alan Stern <stern@rowland.harvard.edu>
49Description:
50 If CONFIG_USB_PERSIST is set, then each USB device directory
51 will contain a file named power/persist. The file holds a
52 boolean value (0 or 1) indicating whether or not the
53 "USB-Persist" facility is enabled for the device. Since the
54 facility is inherently dangerous, it is disabled by default
55 for all devices except hubs. For more information, see
56 Documentation/usb/persist.txt.
57
58What: /sys/bus/usb/device/.../power/connected_duration
59Date: January 2008
60KernelVersion: 2.6.25
61Contact: Sarah Sharp <sarah.a.sharp@intel.com>
62Description:
63 If CONFIG_PM and CONFIG_USB_SUSPEND are enabled, then this file
64 is present. When read, it returns the total time (in msec)
65 that the USB device has been connected to the machine. This
66 file is read-only.
67Users:
68 PowerTOP <power@bughost.org>
69 http://www.lesswatts.org/projects/powertop/
70
71What: /sys/bus/usb/device/.../power/active_duration
72Date: January 2008
73KernelVersion: 2.6.25
74Contact: Sarah Sharp <sarah.a.sharp@intel.com>
75Description:
76 If CONFIG_PM and CONFIG_USB_SUSPEND are enabled, then this file
77 is present. When read, it returns the total time (in msec)
78 that the USB device has been active, i.e. not in a suspended
79 state. This file is read-only.
80
81 Tools can use this file and the connected_duration file to
82 compute the percentage of time that a device has been active.
83 For example,
84 echo $((100 * `cat active_duration` / `cat connected_duration`))
85 will give an integer percentage. Note that this does not
86 account for counter wrap.
87Users:
88 PowerTOP <power@bughost.org>
89 http://www.lesswatts.org/projects/powertop/
90
91What: /sys/bus/usb/device/<busnum>-<devnum>...:<config num>-<interface num>/supports_autosuspend
92Date: January 2008
93KernelVersion: 2.6.27
94Contact: Sarah Sharp <sarah.a.sharp@intel.com>
95Description:
96 When read, this file returns 1 if the interface driver
97 for this interface supports autosuspend. It also
98 returns 1 if no driver has claimed this interface, as an
99 unclaimed interface will not stop the device from being
100 autosuspended if all other interface drivers are idle.
101 The file returns 0 if autosuspend support has not been
102 added to the driver.
103Users:
104 USB PM tool
105 git://git.moblin.org/users/sarah/usb-pm-tool/
106
107What: /sys/bus/usb/device/.../authorized
108Date: July 2008
109KernelVersion: 2.6.26
110Contact: David Vrabel <david.vrabel@csr.com>
111Description:
112 Authorized devices are available for use by device
113 drivers, non-authorized one are not. By default, wired
114 USB devices are authorized.
115
116 Certified Wireless USB devices are not authorized
117 initially and should be (by writing 1) after the
118 device has been authenticated.
119
120What: /sys/bus/usb/device/.../wusb_cdid
121Date: July 2008
122KernelVersion: 2.6.27
123Contact: David Vrabel <david.vrabel@csr.com>
124Description:
125 For Certified Wireless USB devices only.
126
127 A devices's CDID, as 16 space-separated hex octets.
128
129What: /sys/bus/usb/device/.../wusb_ck
130Date: July 2008
131KernelVersion: 2.6.27
132Contact: David Vrabel <david.vrabel@csr.com>
133Description:
134 For Certified Wireless USB devices only.
135
136 Write the device's connection key (CK) to start the
137 authentication of the device. The CK is 16
138 space-separated hex octets.
139
140What: /sys/bus/usb/device/.../wusb_disconnect
141Date: July 2008
142KernelVersion: 2.6.27
143Contact: David Vrabel <david.vrabel@csr.com>
144Description:
145 For Certified Wireless USB devices only.
146
147 Write a 1 to force the device to disconnect
148 (equivalent to unplugging a wired USB device).
149
150What: /sys/bus/usb/drivers/.../remove_id
151Date: November 2009
152Contact: CHENG Renquan <rqcheng@smu.edu.sg>
153Description:
154 Writing a device ID to this file will remove an ID
155 that was dynamically added via the new_id sysfs entry.
156 The format for the device ID is:
157 idVendor idProduct. After successfully
158 removing an ID, the driver will no longer support the
159 device. This is useful to ensure auto probing won't
160 match the driver to the device. For example:
161 # echo "046d c315" > /sys/bus/usb/drivers/foo/remove_id
162
163What: /sys/bus/usb/device/.../avoid_reset_quirk
164Date: December 2009
165Contact: Oliver Neukum <oliver@neukum.org>
166Description:
167 Writing 1 to this file tells the kernel that this
168 device will morph into another mode when it is reset.
169 Drivers will not use reset for error handling for
170 such devices.
171Users:
172 usb_modeswitch