162306a36Sopenharmony_ciWhat: /sys/bus/usb/devices/.../power/persist 262306a36Sopenharmony_ciDate: May 2007 362306a36Sopenharmony_ciKernelVersion: 2.6.23 462306a36Sopenharmony_ciContact: Alan Stern <stern@rowland.harvard.edu> 562306a36Sopenharmony_ciDescription: 662306a36Sopenharmony_ci USB device directories can contain a file named power/persist. 762306a36Sopenharmony_ci The file holds a boolean value (0 or 1) indicating whether or 862306a36Sopenharmony_ci not the "USB-Persist" facility is enabled for the device. For 962306a36Sopenharmony_ci hubs this facility is always enabled and their device 1062306a36Sopenharmony_ci directories will not contain this file. 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci For more information, see Documentation/driver-api/usb/persist.rst. 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ciWhat: /sys/bus/usb/devices/.../power/autosuspend 1562306a36Sopenharmony_ciDate: March 2007 1662306a36Sopenharmony_ciKernelVersion: 2.6.21 1762306a36Sopenharmony_ciContact: Alan Stern <stern@rowland.harvard.edu> 1862306a36Sopenharmony_ciDescription: 1962306a36Sopenharmony_ci Each USB device directory will contain a file named 2062306a36Sopenharmony_ci power/autosuspend. This file holds the time (in seconds) 2162306a36Sopenharmony_ci the device must be idle before it will be autosuspended. 2262306a36Sopenharmony_ci 0 means the device will be autosuspended as soon as 2362306a36Sopenharmony_ci possible. Negative values will prevent the device from 2462306a36Sopenharmony_ci being autosuspended at all, and writing a negative value 2562306a36Sopenharmony_ci will resume the device if it is already suspended. 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ci The autosuspend delay for newly-created devices is set to 2862306a36Sopenharmony_ci the value of the usbcore.autosuspend module parameter. 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ciWhat: /sys/bus/usb/device/.../power/connected_duration 3162306a36Sopenharmony_ciDate: January 2008 3262306a36Sopenharmony_ciKernelVersion: 2.6.25 3362306a36Sopenharmony_ciContact: Sarah Sharp <sarah.a.sharp@intel.com> 3462306a36Sopenharmony_ciDescription: 3562306a36Sopenharmony_ci If CONFIG_PM is enabled, then this file is present. When read, 3662306a36Sopenharmony_ci it returns the total time (in msec) that the USB device has been 3762306a36Sopenharmony_ci connected to the machine. This file is read-only. 3862306a36Sopenharmony_ciUsers: 3962306a36Sopenharmony_ci PowerTOP <powertop@lists.01.org> 4062306a36Sopenharmony_ci https://01.org/powertop/ 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ciWhat: /sys/bus/usb/device/.../power/active_duration 4362306a36Sopenharmony_ciDate: January 2008 4462306a36Sopenharmony_ciKernelVersion: 2.6.25 4562306a36Sopenharmony_ciContact: Sarah Sharp <sarah.a.sharp@intel.com> 4662306a36Sopenharmony_ciDescription: 4762306a36Sopenharmony_ci If CONFIG_PM is enabled, then this file is present. When read, 4862306a36Sopenharmony_ci it returns the total time (in msec) that the USB device has been 4962306a36Sopenharmony_ci active, i.e. not in a suspended state. This file is read-only. 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci Tools can use this file and the connected_duration file to 5262306a36Sopenharmony_ci compute the percentage of time that a device has been active. 5362306a36Sopenharmony_ci For example:: 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ci echo $((100 * `cat active_duration` / `cat connected_duration`)) 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ci will give an integer percentage. Note that this does not 5862306a36Sopenharmony_ci account for counter wrap. 5962306a36Sopenharmony_ciUsers: 6062306a36Sopenharmony_ci PowerTOP <powertop@lists.01.org> 6162306a36Sopenharmony_ci https://01.org/powertop/ 6262306a36Sopenharmony_ci 6362306a36Sopenharmony_ciWhat: /sys/bus/usb/devices/<busnum>-<port[.port]>...:<config num>-<interface num>/supports_autosuspend 6462306a36Sopenharmony_ciDate: January 2008 6562306a36Sopenharmony_ciKernelVersion: 2.6.27 6662306a36Sopenharmony_ciContact: Sarah Sharp <sarah.a.sharp@intel.com> 6762306a36Sopenharmony_ciDescription: 6862306a36Sopenharmony_ci When read, this file returns 1 if the interface driver 6962306a36Sopenharmony_ci for this interface supports autosuspend. It also 7062306a36Sopenharmony_ci returns 1 if no driver has claimed this interface, as an 7162306a36Sopenharmony_ci unclaimed interface will not stop the device from being 7262306a36Sopenharmony_ci autosuspended if all other interface drivers are idle. 7362306a36Sopenharmony_ci The file returns 0 if autosuspend support has not been 7462306a36Sopenharmony_ci added to the driver. 7562306a36Sopenharmony_ciUsers: 7662306a36Sopenharmony_ci USB PM tool 7762306a36Sopenharmony_ci git://git.moblin.org/users/sarah/usb-pm-tool/ 7862306a36Sopenharmony_ci 7962306a36Sopenharmony_ciWhat: /sys/bus/usb/device/.../avoid_reset_quirk 8062306a36Sopenharmony_ciDate: December 2009 8162306a36Sopenharmony_ciContact: Oliver Neukum <oliver@neukum.org> 8262306a36Sopenharmony_ciDescription: 8362306a36Sopenharmony_ci Writing 1 to this file tells the kernel that this 8462306a36Sopenharmony_ci device will morph into another mode when it is reset. 8562306a36Sopenharmony_ci Drivers will not use reset for error handling for 8662306a36Sopenharmony_ci such devices. 8762306a36Sopenharmony_ciUsers: 8862306a36Sopenharmony_ci usb_modeswitch 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_ciWhat: /sys/bus/usb/devices/.../devnum 9162306a36Sopenharmony_ciKernelVersion: since at least 2.6.18 9262306a36Sopenharmony_ciDescription: 9362306a36Sopenharmony_ci Device address on the USB bus. 9462306a36Sopenharmony_ciUsers: 9562306a36Sopenharmony_ci libusb 9662306a36Sopenharmony_ci 9762306a36Sopenharmony_ciWhat: /sys/bus/usb/devices/.../bConfigurationValue 9862306a36Sopenharmony_ciKernelVersion: since at least 2.6.18 9962306a36Sopenharmony_ciDescription: 10062306a36Sopenharmony_ci bConfigurationValue of the *active* configuration for the 10162306a36Sopenharmony_ci device. Writing 0 or -1 to bConfigurationValue will reset the 10262306a36Sopenharmony_ci active configuration (unconfigure the device). Writing 10362306a36Sopenharmony_ci another value will change the active configuration. 10462306a36Sopenharmony_ci 10562306a36Sopenharmony_ci Note that some devices, in violation of the USB spec, have a 10662306a36Sopenharmony_ci configuration with a value equal to 0. Writing 0 to 10762306a36Sopenharmony_ci bConfigurationValue for these devices will install that 10862306a36Sopenharmony_ci configuration, rather then unconfigure the device. 10962306a36Sopenharmony_ci 11062306a36Sopenharmony_ci Writing -1 will always unconfigure the device. 11162306a36Sopenharmony_ciUsers: 11262306a36Sopenharmony_ci libusb 11362306a36Sopenharmony_ci 11462306a36Sopenharmony_ciWhat: /sys/bus/usb/devices/.../busnum 11562306a36Sopenharmony_ciKernelVersion: 2.6.22 11662306a36Sopenharmony_ciDescription: 11762306a36Sopenharmony_ci Bus-number of the USB-bus the device is connected to. 11862306a36Sopenharmony_ciUsers: 11962306a36Sopenharmony_ci libusb 12062306a36Sopenharmony_ci 12162306a36Sopenharmony_ciWhat: /sys/bus/usb/devices/.../descriptors 12262306a36Sopenharmony_ciKernelVersion: 2.6.26 12362306a36Sopenharmony_ciDescription: 12462306a36Sopenharmony_ci Binary file containing cached descriptors of the device. The 12562306a36Sopenharmony_ci binary data consists of the device descriptor followed by the 12662306a36Sopenharmony_ci descriptors for each configuration of the device. 12762306a36Sopenharmony_ci Note that the wTotalLength of the config descriptors can not 12862306a36Sopenharmony_ci be trusted, as the device may have a smaller config descriptor 12962306a36Sopenharmony_ci than it advertises. The bLength field of each (sub) descriptor 13062306a36Sopenharmony_ci can be trusted, and can be used to seek forward one (sub) 13162306a36Sopenharmony_ci descriptor at a time until the next config descriptor is found. 13262306a36Sopenharmony_ci All descriptors read from this file are in bus-endian format 13362306a36Sopenharmony_ciUsers: 13462306a36Sopenharmony_ci libusb 13562306a36Sopenharmony_ci 13662306a36Sopenharmony_ciWhat: /sys/bus/usb/devices/.../speed 13762306a36Sopenharmony_ciKernelVersion: since at least 2.6.18 13862306a36Sopenharmony_ciDescription: 13962306a36Sopenharmony_ci Speed the device is connected with to the usb-host in 14062306a36Sopenharmony_ci Mbit / second. IE one of 1.5 / 12 / 480 / 5000. 14162306a36Sopenharmony_ciUsers: 14262306a36Sopenharmony_ci libusb 143