0001 What: /sys/bus/usb/devices/.../power/persist
0002 Date: May 2007
0003 KernelVersion: 2.6.23
0004 Contact: Alan Stern <stern@rowland.harvard.edu>
0005 Description:
0006 USB device directories can contain a file named power/persist.
0007 The file holds a boolean value (0 or 1) indicating whether or
0008 not the "USB-Persist" facility is enabled for the device. For
0009 hubs this facility is always enabled and their device
0010 directories will not contain this file.
0011
0012 For more information, see Documentation/driver-api/usb/persist.rst.
0013
0014 What: /sys/bus/usb/devices/.../power/autosuspend
0015 Date: March 2007
0016 KernelVersion: 2.6.21
0017 Contact: Alan Stern <stern@rowland.harvard.edu>
0018 Description:
0019 Each USB device directory will contain a file named
0020 power/autosuspend. This file holds the time (in seconds)
0021 the device must be idle before it will be autosuspended.
0022 0 means the device will be autosuspended as soon as
0023 possible. Negative values will prevent the device from
0024 being autosuspended at all, and writing a negative value
0025 will resume the device if it is already suspended.
0026
0027 The autosuspend delay for newly-created devices is set to
0028 the value of the usbcore.autosuspend module parameter.
0029
0030 What: /sys/bus/usb/device/.../power/connected_duration
0031 Date: January 2008
0032 KernelVersion: 2.6.25
0033 Contact: Sarah Sharp <sarah.a.sharp@intel.com>
0034 Description:
0035 If CONFIG_PM is enabled, then this file is present. When read,
0036 it returns the total time (in msec) that the USB device has been
0037 connected to the machine. This file is read-only.
0038 Users:
0039 PowerTOP <powertop@lists.01.org>
0040 https://01.org/powertop/
0041
0042 What: /sys/bus/usb/device/.../power/active_duration
0043 Date: January 2008
0044 KernelVersion: 2.6.25
0045 Contact: Sarah Sharp <sarah.a.sharp@intel.com>
0046 Description:
0047 If CONFIG_PM is enabled, then this file is present. When read,
0048 it returns the total time (in msec) that the USB device has been
0049 active, i.e. not in a suspended state. This file is read-only.
0050
0051 Tools can use this file and the connected_duration file to
0052 compute the percentage of time that a device has been active.
0053 For example::
0054
0055 echo $((100 * `cat active_duration` / `cat connected_duration`))
0056
0057 will give an integer percentage. Note that this does not
0058 account for counter wrap.
0059 Users:
0060 PowerTOP <powertop@lists.01.org>
0061 https://01.org/powertop/
0062
0063 What: /sys/bus/usb/devices/<busnum>-<port[.port]>...:<config num>-<interface num>/supports_autosuspend
0064 Date: January 2008
0065 KernelVersion: 2.6.27
0066 Contact: Sarah Sharp <sarah.a.sharp@intel.com>
0067 Description:
0068 When read, this file returns 1 if the interface driver
0069 for this interface supports autosuspend. It also
0070 returns 1 if no driver has claimed this interface, as an
0071 unclaimed interface will not stop the device from being
0072 autosuspended if all other interface drivers are idle.
0073 The file returns 0 if autosuspend support has not been
0074 added to the driver.
0075 Users:
0076 USB PM tool
0077 git://git.moblin.org/users/sarah/usb-pm-tool/
0078
0079 What: /sys/bus/usb/device/.../avoid_reset_quirk
0080 Date: December 2009
0081 Contact: Oliver Neukum <oliver@neukum.org>
0082 Description:
0083 Writing 1 to this file tells the kernel that this
0084 device will morph into another mode when it is reset.
0085 Drivers will not use reset for error handling for
0086 such devices.
0087 Users:
0088 usb_modeswitch
0089
0090 What: /sys/bus/usb/devices/.../devnum
0091 KernelVersion: since at least 2.6.18
0092 Description:
0093 Device address on the USB bus.
0094 Users:
0095 libusb
0096
0097 What: /sys/bus/usb/devices/.../bConfigurationValue
0098 KernelVersion: since at least 2.6.18
0099 Description:
0100 bConfigurationValue of the *active* configuration for the
0101 device. Writing 0 or -1 to bConfigurationValue will reset the
0102 active configuration (unconfigure the device). Writing
0103 another value will change the active configuration.
0104
0105 Note that some devices, in violation of the USB spec, have a
0106 configuration with a value equal to 0. Writing 0 to
0107 bConfigurationValue for these devices will install that
0108 configuration, rather then unconfigure the device.
0109
0110 Writing -1 will always unconfigure the device.
0111 Users:
0112 libusb
0113
0114 What: /sys/bus/usb/devices/.../busnum
0115 KernelVersion: 2.6.22
0116 Description:
0117 Bus-number of the USB-bus the device is connected to.
0118 Users:
0119 libusb
0120
0121 What: /sys/bus/usb/devices/.../descriptors
0122 KernelVersion: 2.6.26
0123 Description:
0124 Binary file containing cached descriptors of the device. The
0125 binary data consists of the device descriptor followed by the
0126 descriptors for each configuration of the device.
0127 Note that the wTotalLength of the config descriptors can not
0128 be trusted, as the device may have a smaller config descriptor
0129 than it advertises. The bLength field of each (sub) descriptor
0130 can be trusted, and can be used to seek forward one (sub)
0131 descriptor at a time until the next config descriptor is found.
0132 All descriptors read from this file are in bus-endian format
0133 Users:
0134 libusb
0135
0136 What: /sys/bus/usb/devices/.../speed
0137 KernelVersion: since at least 2.6.18
0138 Description:
0139 Speed the device is connected with to the usb-host in
0140 Mbit / second. IE one of 1.5 / 12 / 480 / 5000.
0141 Users:
0142 libusb