Alan Stern | eaafbc3 | 2007-03-13 16:39:15 -0400 | [diff] [blame] | 1 | What: /sys/bus/usb/devices/.../power/autosuspend |
| 2 | Date: March 2007 |
| 3 | KernelVersion: 2.6.21 |
| 4 | Contact: Alan Stern <stern@rowland.harvard.edu> |
| 5 | Description: |
| 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 Stern | 2add522 | 2007-03-20 14:59:39 -0400 | [diff] [blame] | 16 | |
| 17 | What: /sys/bus/usb/devices/.../power/level |
| 18 | Date: March 2007 |
| 19 | KernelVersion: 2.6.21 |
| 20 | Contact: Alan Stern <stern@rowland.harvard.edu> |
| 21 | Description: |
| 22 | Each USB device directory will contain a file named |
| 23 | power/level. This file holds a power-level setting for |
Alan Stern | baf6774 | 2009-12-08 15:49:48 -0500 | [diff] [blame] | 24 | the device, either "on" or "auto". |
Alan Stern | 2add522 | 2007-03-20 14:59:39 -0400 | [diff] [blame] | 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 |
Alan Stern | baf6774 | 2009-12-08 15:49:48 -0500 | [diff] [blame] | 30 | capabilities of its driver. |
Alan Stern | 2add522 | 2007-03-20 14:59:39 -0400 | [diff] [blame] | 31 | |
| 32 | During normal use, devices should be left in the "auto" |
Alan Stern | baf6774 | 2009-12-08 15:49:48 -0500 | [diff] [blame] | 33 | level. The "on" level is meant for administrative uses. |
Alan Stern | 2add522 | 2007-03-20 14:59:39 -0400 | [diff] [blame] | 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. |
Alan Stern | b41a60e | 2007-05-30 15:39:33 -0400 | [diff] [blame] | 37 | |
Alan Stern | baf6774 | 2009-12-08 15:49:48 -0500 | [diff] [blame] | 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 | |
Alan Stern | b41a60e | 2007-05-30 15:39:33 -0400 | [diff] [blame] | 45 | What: /sys/bus/usb/devices/.../power/persist |
| 46 | Date: May 2007 |
| 47 | KernelVersion: 2.6.23 |
| 48 | Contact: Alan Stern <stern@rowland.harvard.edu> |
| 49 | Description: |
| 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. |
Sarah Sharp | 979e524 | 2008-01-17 10:24:38 -0800 | [diff] [blame] | 57 | |
| 58 | What: /sys/bus/usb/device/.../power/connected_duration |
| 59 | Date: January 2008 |
| 60 | KernelVersion: 2.6.25 |
| 61 | Contact: Sarah Sharp <sarah.a.sharp@intel.com> |
| 62 | Description: |
| 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. |
| 67 | Users: |
| 68 | PowerTOP <power@bughost.org> |
| 69 | http://www.lesswatts.org/projects/powertop/ |
| 70 | |
| 71 | What: /sys/bus/usb/device/.../power/active_duration |
| 72 | Date: January 2008 |
| 73 | KernelVersion: 2.6.25 |
| 74 | Contact: Sarah Sharp <sarah.a.sharp@intel.com> |
| 75 | Description: |
| 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. |
| 87 | Users: |
| 88 | PowerTOP <power@bughost.org> |
| 89 | http://www.lesswatts.org/projects/powertop/ |
David Vrabel | c8cf246 | 2008-09-17 16:34:41 +0100 | [diff] [blame] | 90 | |
Sarah Sharp | 49e7cc8 | 2008-10-06 14:45:46 -0700 | [diff] [blame] | 91 | What: /sys/bus/usb/device/<busnum>-<devnum>...:<config num>-<interface num>/supports_autosuspend |
| 92 | Date: January 2008 |
| 93 | KernelVersion: 2.6.27 |
| 94 | Contact: Sarah Sharp <sarah.a.sharp@intel.com> |
| 95 | Description: |
| 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. |
| 103 | Users: |
| 104 | USB PM tool |
| 105 | git://git.moblin.org/users/sarah/usb-pm-tool/ |
David Vrabel | 61e0e79 | 2008-10-20 16:07:19 +0100 | [diff] [blame] | 106 | |
David Vrabel | c8cf246 | 2008-09-17 16:34:41 +0100 | [diff] [blame] | 107 | What: /sys/bus/usb/device/.../authorized |
| 108 | Date: July 2008 |
| 109 | KernelVersion: 2.6.26 |
| 110 | Contact: David Vrabel <david.vrabel@csr.com> |
| 111 | Description: |
| 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 | |
| 120 | What: /sys/bus/usb/device/.../wusb_cdid |
| 121 | Date: July 2008 |
| 122 | KernelVersion: 2.6.27 |
| 123 | Contact: David Vrabel <david.vrabel@csr.com> |
| 124 | Description: |
| 125 | For Certified Wireless USB devices only. |
| 126 | |
| 127 | A devices's CDID, as 16 space-separated hex octets. |
| 128 | |
| 129 | What: /sys/bus/usb/device/.../wusb_ck |
| 130 | Date: July 2008 |
| 131 | KernelVersion: 2.6.27 |
| 132 | Contact: David Vrabel <david.vrabel@csr.com> |
| 133 | Description: |
| 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 | |
| 140 | What: /sys/bus/usb/device/.../wusb_disconnect |
| 141 | Date: July 2008 |
| 142 | KernelVersion: 2.6.27 |
| 143 | Contact: David Vrabel <david.vrabel@csr.com> |
| 144 | Description: |
| 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). |
CHENG Renquan | 0c7a2b7 | 2009-11-22 01:28:52 +0800 | [diff] [blame] | 149 | |
| 150 | What: /sys/bus/usb/drivers/.../remove_id |
| 151 | Date: November 2009 |
| 152 | Contact: CHENG Renquan <rqcheng@smu.edu.sg> |
| 153 | Description: |
| 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 |
Oliver Neukum | ef95534 | 2010-01-16 01:33:03 +0100 | [diff] [blame] | 162 | |
Oliver Neukum | 1e63ef0 | 2010-03-12 11:27:21 +0100 | [diff] [blame^] | 163 | What: /sys/bus/usb/device/.../avoid_reset_quirk |
Oliver Neukum | ef95534 | 2010-01-16 01:33:03 +0100 | [diff] [blame] | 164 | Date: December 2009 |
| 165 | Contact: Oliver Neukum <oliver@neukum.org> |
| 166 | Description: |
| 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. |
| 171 | Users: |
| 172 | usb_modeswitch |