blob: b832eeff999914b0afa4e4a99d7379e4f852dea8 [file] [log] [blame]
Hans de Goede1f77fdf2013-08-30 11:00:21 +02001What: /sys/bus/usb/devices/.../power/persist
2Date: May 2007
3KernelVersion: 2.6.23
4Contact: Alan Stern <stern@rowland.harvard.edu>
5Description:
Paul Bollecc583db2014-07-02 12:10:45 +02006 USB device directories can contain a file named power/persist.
7 The file holds a boolean value (0 or 1) indicating whether or
8 not the "USB-Persist" facility is enabled for the device. For
9 hubs this facility is always enabled and their device
10 directories will not contain this file.
11
Mauro Carvalho Chehabe1c3e6e2017-04-05 10:23:15 -030012 For more information, see Documentation/driver-api/usb/persist.rst.
Hans de Goede1f77fdf2013-08-30 11:00:21 +020013
14What: /sys/bus/usb/devices/.../power/autosuspend
15Date: March 2007
16KernelVersion: 2.6.21
17Contact: Alan Stern <stern@rowland.harvard.edu>
18Description:
19 Each USB device directory will contain a file named
20 power/autosuspend. This file holds the time (in seconds)
21 the device must be idle before it will be autosuspended.
22 0 means the device will be autosuspended as soon as
23 possible. Negative values will prevent the device from
24 being autosuspended at all, and writing a negative value
25 will resume the device if it is already suspended.
26
27 The autosuspend delay for newly-created devices is set to
28 the value of the usbcore.autosuspend module parameter.
29
30What: /sys/bus/usb/device/.../power/connected_duration
31Date: January 2008
32KernelVersion: 2.6.25
33Contact: Sarah Sharp <sarah.a.sharp@intel.com>
34Description:
Rafael J. Wysockiceb6c9c2014-11-29 23:47:05 +010035 If CONFIG_PM is enabled, then this file is present. When read,
36 it returns the total time (in msec) that the USB device has been
37 connected to the machine. This file is read-only.
Hans de Goede1f77fdf2013-08-30 11:00:21 +020038Users:
Rafael J. Wysockiaaf3d292013-10-10 23:25:58 +020039 PowerTOP <powertop@lists.01.org>
40 https://01.org/powertop/
Hans de Goede1f77fdf2013-08-30 11:00:21 +020041
42What: /sys/bus/usb/device/.../power/active_duration
43Date: January 2008
44KernelVersion: 2.6.25
45Contact: Sarah Sharp <sarah.a.sharp@intel.com>
46Description:
Rafael J. Wysockiceb6c9c2014-11-29 23:47:05 +010047 If CONFIG_PM is enabled, then this file is present. When read,
48 it returns the total time (in msec) that the USB device has been
49 active, i.e. not in a suspended state. This file is read-only.
Hans de Goede1f77fdf2013-08-30 11:00:21 +020050
51 Tools can use this file and the connected_duration file to
52 compute the percentage of time that a device has been active.
53 For example,
54 echo $((100 * `cat active_duration` / `cat connected_duration`))
55 will give an integer percentage. Note that this does not
56 account for counter wrap.
57Users:
Rafael J. Wysockiaaf3d292013-10-10 23:25:58 +020058 PowerTOP <powertop@lists.01.org>
59 https://01.org/powertop/
Hans de Goede1f77fdf2013-08-30 11:00:21 +020060
61What: /sys/bus/usb/devices/<busnum>-<port[.port]>...:<config num>-<interface num>/supports_autosuspend
62Date: January 2008
63KernelVersion: 2.6.27
64Contact: Sarah Sharp <sarah.a.sharp@intel.com>
65Description:
66 When read, this file returns 1 if the interface driver
67 for this interface supports autosuspend. It also
68 returns 1 if no driver has claimed this interface, as an
69 unclaimed interface will not stop the device from being
70 autosuspended if all other interface drivers are idle.
71 The file returns 0 if autosuspend support has not been
72 added to the driver.
73Users:
74 USB PM tool
75 git://git.moblin.org/users/sarah/usb-pm-tool/
76
77What: /sys/bus/usb/device/.../avoid_reset_quirk
78Date: December 2009
79Contact: Oliver Neukum <oliver@neukum.org>
80Description:
81 Writing 1 to this file tells the kernel that this
82 device will morph into another mode when it is reset.
83 Drivers will not use reset for error handling for
84 such devices.
85Users:
86 usb_modeswitch
87
88What: /sys/bus/usb/devices/.../devnum
89KernelVersion: since at least 2.6.18
90Description:
91 Device address on the USB bus.
Hans de Goede2eb86032013-08-30 11:00:23 +020092Users:
93 libusb
Hans de Goede1f77fdf2013-08-30 11:00:21 +020094
95What: /sys/bus/usb/devices/.../bConfigurationValue
96KernelVersion: since at least 2.6.18
97Description:
98 bConfigurationValue of the *active* configuration for the
99 device. Writing 0 or -1 to bConfigurationValue will reset the
100 active configuration (unconfigure the device). Writing
101 another value will change the active configuration.
102
103 Note that some devices, in violation of the USB spec, have a
104 configuration with a value equal to 0. Writing 0 to
105 bConfigurationValue for these devices will install that
106 configuration, rather then unconfigure the device.
107
108 Writing -1 will always unconfigure the device.
Hans de Goede2eb86032013-08-30 11:00:23 +0200109Users:
110 libusb
Hans de Goede1f77fdf2013-08-30 11:00:21 +0200111
112What: /sys/bus/usb/devices/.../busnum
113KernelVersion: 2.6.22
114Description:
115 Bus-number of the USB-bus the device is connected to.
Hans de Goede2eb86032013-08-30 11:00:23 +0200116Users:
117 libusb
Hans de Goede1f77fdf2013-08-30 11:00:21 +0200118
119What: /sys/bus/usb/devices/.../descriptors
120KernelVersion: 2.6.26
121Description:
122 Binary file containing cached descriptors of the device. The
123 binary data consists of the device descriptor followed by the
124 descriptors for each configuration of the device.
125 Note that the wTotalLength of the config descriptors can not
126 be trusted, as the device may have a smaller config descriptor
127 than it advertises. The bLength field of each (sub) descriptor
128 can be trusted, and can be used to seek forward one (sub)
129 descriptor at a time until the next config descriptor is found.
130 All descriptors read from this file are in bus-endian format
Hans de Goede2eb86032013-08-30 11:00:23 +0200131Users:
132 libusb
Hans de Goededb187a52013-08-30 11:00:22 +0200133
134What: /sys/bus/usb/devices/.../speed
135KernelVersion: since at least 2.6.18
136Description:
137 Speed the device is connected with to the usb-host in
138 Mbit / second. IE one of 1.5 / 12 / 480 / 5000.
Hans de Goede2eb86032013-08-30 11:00:23 +0200139Users:
140 libusb