]> Pileus Git - ~andy/linux/blob - Documentation/ABI/stable/sysfs-bus-usb
a596414964c5ce1fe054a9950d0ec5ad53797bff
[~andy/linux] / Documentation / ABI / stable / sysfs-bus-usb
1 What:           /sys/bus/usb/devices/.../power/persist
2 Date:           May 2007
3 KernelVersion:  2.6.23
4 Contact:        Alan Stern <stern@rowland.harvard.edu>
5 Description:
6                 If CONFIG_USB_PERSIST is set, then each USB device directory
7                 will contain a file named power/persist.  The file holds a
8                 boolean value (0 or 1) indicating whether or not the
9                 "USB-Persist" facility is enabled for the device.  Since the
10                 facility is inherently dangerous, it is disabled by default
11                 for all devices except hubs.  For more information, see
12                 Documentation/usb/persist.txt.
13
14 What:           /sys/bus/usb/devices/.../power/autosuspend
15 Date:           March 2007
16 KernelVersion:  2.6.21
17 Contact:        Alan Stern <stern@rowland.harvard.edu>
18 Description:
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
30 What:           /sys/bus/usb/device/.../power/connected_duration
31 Date:           January 2008
32 KernelVersion:  2.6.25
33 Contact:        Sarah Sharp <sarah.a.sharp@intel.com>
34 Description:
35                 If CONFIG_PM_RUNTIME is 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.
39 Users:
40                 PowerTOP <power@bughost.org>
41                 http://www.lesswatts.org/projects/powertop/
42
43 What:           /sys/bus/usb/device/.../power/active_duration
44 Date:           January 2008
45 KernelVersion:  2.6.25
46 Contact:        Sarah Sharp <sarah.a.sharp@intel.com>
47 Description:
48                 If CONFIG_PM_RUNTIME is 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.
59 Users:
60                 PowerTOP <power@bughost.org>
61                 http://www.lesswatts.org/projects/powertop/
62
63 What:           /sys/bus/usb/devices/<busnum>-<port[.port]>...:<config num>-<interface num>/supports_autosuspend
64 Date:           January 2008
65 KernelVersion:  2.6.27
66 Contact:        Sarah Sharp <sarah.a.sharp@intel.com>
67 Description:
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.
75 Users:
76                 USB PM tool
77                 git://git.moblin.org/users/sarah/usb-pm-tool/
78
79 What:           /sys/bus/usb/device/.../avoid_reset_quirk
80 Date:           December 2009
81 Contact:        Oliver Neukum <oliver@neukum.org>
82 Description:
83                 Writing 1 to this file tells the kernel that this
84                 device will morph into another mode when it is reset.
85                 Drivers will not use reset for error handling for
86                 such devices.
87 Users:
88                 usb_modeswitch
89
90 What:           /sys/bus/usb/devices/.../devnum
91 KernelVersion:  since at least 2.6.18
92 Description:
93                 Device address on the USB bus.
94
95 What:           /sys/bus/usb/devices/.../bConfigurationValue
96 KernelVersion:  since at least 2.6.18
97 Description:
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.
109
110 What:           /sys/bus/usb/devices/.../busnum
111 KernelVersion:  2.6.22
112 Description:
113                 Bus-number of the USB-bus the device is connected to.
114
115 What:           /sys/bus/usb/devices/.../descriptors
116 KernelVersion:  2.6.26
117 Description:
118                 Binary file containing cached descriptors of the device. The
119                 binary data consists of the device descriptor followed by the
120                 descriptors for each configuration of the device.
121                 Note that the wTotalLength of the config descriptors can not
122                 be trusted, as the device may have a smaller config descriptor
123                 than it advertises. The bLength field of each (sub) descriptor
124                 can be trusted, and can be used to seek forward one (sub)
125                 descriptor at a time until the next config descriptor is found.
126                 All descriptors read from this file are in bus-endian format
127
128 What:           /sys/bus/usb/devices/.../speed
129 KernelVersion:  since at least 2.6.18
130 Description:
131                 Speed the device is connected with to the usb-host in
132                 Mbit / second. IE one of 1.5 / 12 / 480 / 5000.