1eaafbc3aSAlan SternWhat: /sys/bus/usb/devices/.../power/autosuspend 2eaafbc3aSAlan SternDate: March 2007 3eaafbc3aSAlan SternKernelVersion: 2.6.21 4eaafbc3aSAlan SternContact: Alan Stern <stern@rowland.harvard.edu> 5eaafbc3aSAlan SternDescription: 6eaafbc3aSAlan Stern Each USB device directory will contain a file named 7eaafbc3aSAlan Stern power/autosuspend. This file holds the time (in seconds) 8eaafbc3aSAlan Stern the device must be idle before it will be autosuspended. 9eaafbc3aSAlan Stern 0 means the device will be autosuspended as soon as 10eaafbc3aSAlan Stern possible. Negative values will prevent the device from 11eaafbc3aSAlan Stern being autosuspended at all, and writing a negative value 12eaafbc3aSAlan Stern will resume the device if it is already suspended. 13eaafbc3aSAlan Stern 14eaafbc3aSAlan Stern The autosuspend delay for newly-created devices is set to 15eaafbc3aSAlan Stern the value of the usbcore.autosuspend module parameter. 162add5229SAlan Stern 17b41a60ecSAlan SternWhat: /sys/bus/usb/devices/.../power/persist 18b41a60ecSAlan SternDate: May 2007 19b41a60ecSAlan SternKernelVersion: 2.6.23 20b41a60ecSAlan SternContact: Alan Stern <stern@rowland.harvard.edu> 21b41a60ecSAlan SternDescription: 22b41a60ecSAlan Stern If CONFIG_USB_PERSIST is set, then each USB device directory 23b41a60ecSAlan Stern will contain a file named power/persist. The file holds a 24b41a60ecSAlan Stern boolean value (0 or 1) indicating whether or not the 25b41a60ecSAlan Stern "USB-Persist" facility is enabled for the device. Since the 26b41a60ecSAlan Stern facility is inherently dangerous, it is disabled by default 27b41a60ecSAlan Stern for all devices except hubs. For more information, see 28b41a60ecSAlan Stern Documentation/usb/persist.txt. 29979e524aSSarah Sharp 30979e524aSSarah SharpWhat: /sys/bus/usb/device/.../power/connected_duration 31979e524aSSarah SharpDate: January 2008 32979e524aSSarah SharpKernelVersion: 2.6.25 33979e524aSSarah SharpContact: Sarah Sharp <sarah.a.sharp@intel.com> 34979e524aSSarah SharpDescription: 35979e524aSSarah Sharp If CONFIG_PM and CONFIG_USB_SUSPEND are enabled, then this file 36979e524aSSarah Sharp is present. When read, it returns the total time (in msec) 37979e524aSSarah Sharp that the USB device has been connected to the machine. This 38979e524aSSarah Sharp file is read-only. 39979e524aSSarah SharpUsers: 40979e524aSSarah Sharp PowerTOP <power@bughost.org> 41979e524aSSarah Sharp http://www.lesswatts.org/projects/powertop/ 42979e524aSSarah Sharp 43979e524aSSarah SharpWhat: /sys/bus/usb/device/.../power/active_duration 44979e524aSSarah SharpDate: January 2008 45979e524aSSarah SharpKernelVersion: 2.6.25 46979e524aSSarah SharpContact: Sarah Sharp <sarah.a.sharp@intel.com> 47979e524aSSarah SharpDescription: 48979e524aSSarah Sharp If CONFIG_PM and CONFIG_USB_SUSPEND are enabled, then this file 49979e524aSSarah Sharp is present. When read, it returns the total time (in msec) 50979e524aSSarah Sharp that the USB device has been active, i.e. not in a suspended 51979e524aSSarah Sharp state. This file is read-only. 52979e524aSSarah Sharp 53979e524aSSarah Sharp Tools can use this file and the connected_duration file to 54979e524aSSarah Sharp compute the percentage of time that a device has been active. 55979e524aSSarah Sharp For example, 56979e524aSSarah Sharp echo $((100 * `cat active_duration` / `cat connected_duration`)) 57979e524aSSarah Sharp will give an integer percentage. Note that this does not 58979e524aSSarah Sharp account for counter wrap. 59979e524aSSarah SharpUsers: 60979e524aSSarah Sharp PowerTOP <power@bughost.org> 61979e524aSSarah Sharp http://www.lesswatts.org/projects/powertop/ 62c8cf2465SDavid Vrabel 6349e7cc84SSarah SharpWhat: /sys/bus/usb/device/<busnum>-<devnum>...:<config num>-<interface num>/supports_autosuspend 6449e7cc84SSarah SharpDate: January 2008 6549e7cc84SSarah SharpKernelVersion: 2.6.27 6649e7cc84SSarah SharpContact: Sarah Sharp <sarah.a.sharp@intel.com> 6749e7cc84SSarah SharpDescription: 6849e7cc84SSarah Sharp When read, this file returns 1 if the interface driver 6949e7cc84SSarah Sharp for this interface supports autosuspend. It also 7049e7cc84SSarah Sharp returns 1 if no driver has claimed this interface, as an 7149e7cc84SSarah Sharp unclaimed interface will not stop the device from being 7249e7cc84SSarah Sharp autosuspended if all other interface drivers are idle. 7349e7cc84SSarah Sharp The file returns 0 if autosuspend support has not been 7449e7cc84SSarah Sharp added to the driver. 7549e7cc84SSarah SharpUsers: 7649e7cc84SSarah Sharp USB PM tool 7749e7cc84SSarah Sharp git://git.moblin.org/users/sarah/usb-pm-tool/ 7861e0e79eSDavid Vrabel 79c8cf2465SDavid VrabelWhat: /sys/bus/usb/device/.../authorized 80c8cf2465SDavid VrabelDate: July 2008 81c8cf2465SDavid VrabelKernelVersion: 2.6.26 82c8cf2465SDavid VrabelContact: David Vrabel <david.vrabel@csr.com> 83c8cf2465SDavid VrabelDescription: 84c8cf2465SDavid Vrabel Authorized devices are available for use by device 85c8cf2465SDavid Vrabel drivers, non-authorized one are not. By default, wired 86c8cf2465SDavid Vrabel USB devices are authorized. 87c8cf2465SDavid Vrabel 88c8cf2465SDavid Vrabel Certified Wireless USB devices are not authorized 89c8cf2465SDavid Vrabel initially and should be (by writing 1) after the 90c8cf2465SDavid Vrabel device has been authenticated. 91c8cf2465SDavid Vrabel 92c8cf2465SDavid VrabelWhat: /sys/bus/usb/device/.../wusb_cdid 93c8cf2465SDavid VrabelDate: July 2008 94c8cf2465SDavid VrabelKernelVersion: 2.6.27 95c8cf2465SDavid VrabelContact: David Vrabel <david.vrabel@csr.com> 96c8cf2465SDavid VrabelDescription: 97c8cf2465SDavid Vrabel For Certified Wireless USB devices only. 98c8cf2465SDavid Vrabel 99c8cf2465SDavid Vrabel A devices's CDID, as 16 space-separated hex octets. 100c8cf2465SDavid Vrabel 101c8cf2465SDavid VrabelWhat: /sys/bus/usb/device/.../wusb_ck 102c8cf2465SDavid VrabelDate: July 2008 103c8cf2465SDavid VrabelKernelVersion: 2.6.27 104c8cf2465SDavid VrabelContact: David Vrabel <david.vrabel@csr.com> 105c8cf2465SDavid VrabelDescription: 106c8cf2465SDavid Vrabel For Certified Wireless USB devices only. 107c8cf2465SDavid Vrabel 108c8cf2465SDavid Vrabel Write the device's connection key (CK) to start the 109c8cf2465SDavid Vrabel authentication of the device. The CK is 16 110c8cf2465SDavid Vrabel space-separated hex octets. 111c8cf2465SDavid Vrabel 112c8cf2465SDavid VrabelWhat: /sys/bus/usb/device/.../wusb_disconnect 113c8cf2465SDavid VrabelDate: July 2008 114c8cf2465SDavid VrabelKernelVersion: 2.6.27 115c8cf2465SDavid VrabelContact: David Vrabel <david.vrabel@csr.com> 116c8cf2465SDavid VrabelDescription: 117c8cf2465SDavid Vrabel For Certified Wireless USB devices only. 118c8cf2465SDavid Vrabel 119c8cf2465SDavid Vrabel Write a 1 to force the device to disconnect 120c8cf2465SDavid Vrabel (equivalent to unplugging a wired USB device). 1210c7a2b72SCHENG Renquan 1220c7a2b72SCHENG RenquanWhat: /sys/bus/usb/drivers/.../remove_id 1230c7a2b72SCHENG RenquanDate: November 2009 1240c7a2b72SCHENG RenquanContact: CHENG Renquan <rqcheng@smu.edu.sg> 1250c7a2b72SCHENG RenquanDescription: 1260c7a2b72SCHENG Renquan Writing a device ID to this file will remove an ID 1270c7a2b72SCHENG Renquan that was dynamically added via the new_id sysfs entry. 1280c7a2b72SCHENG Renquan The format for the device ID is: 1290c7a2b72SCHENG Renquan idVendor idProduct. After successfully 1300c7a2b72SCHENG Renquan removing an ID, the driver will no longer support the 1310c7a2b72SCHENG Renquan device. This is useful to ensure auto probing won't 1320c7a2b72SCHENG Renquan match the driver to the device. For example: 1330c7a2b72SCHENG Renquan # echo "046d c315" > /sys/bus/usb/drivers/foo/remove_id 134ef955341SOliver Neukum 1351e63ef0eSOliver NeukumWhat: /sys/bus/usb/device/.../avoid_reset_quirk 136ef955341SOliver NeukumDate: December 2009 137ef955341SOliver NeukumContact: Oliver Neukum <oliver@neukum.org> 138ef955341SOliver NeukumDescription: 139ef955341SOliver Neukum Writing 1 to this file tells the kernel that this 140ef955341SOliver Neukum device will morph into another mode when it is reset. 141ef955341SOliver Neukum Drivers will not use reset for error handling for 142ef955341SOliver Neukum such devices. 143ef955341SOliver NeukumUsers: 144ef955341SOliver Neukum usb_modeswitch 145c1045e87SAndiry Xu 146c1045e87SAndiry XuWhat: /sys/bus/usb/devices/.../power/usb2_hardware_lpm 147c1045e87SAndiry XuDate: September 2011 148c1045e87SAndiry XuContact: Andiry Xu <andiry.xu@amd.com> 149c1045e87SAndiry XuDescription: 150c1045e87SAndiry Xu If CONFIG_USB_SUSPEND is set and a USB 2.0 lpm-capable device 151c1045e87SAndiry Xu is plugged in to a xHCI host which support link PM, it will 152c1045e87SAndiry Xu perform a LPM test; if the test is passed and host supports 153c1045e87SAndiry Xu USB2 hardware LPM (xHCI 1.0 feature), USB2 hardware LPM will 154c1045e87SAndiry Xu be enabled for the device and the USB device directory will 155c1045e87SAndiry Xu contain a file named power/usb2_hardware_lpm. The file holds 156c1045e87SAndiry Xu a string value (enable or disable) indicating whether or not 157c1045e87SAndiry Xu USB2 hardware LPM is enabled for the device. Developer can 158c1045e87SAndiry Xu write y/Y/1 or n/N/0 to the file to enable/disable the 159c1045e87SAndiry Xu feature. 160