sysfs-bus-usb 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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. The autosuspend delay for newly-created devices is set to
  14. the value of the usbcore.autosuspend module parameter.
  15. What: /sys/bus/usb/devices/.../power/persist
  16. Date: May 2007
  17. KernelVersion: 2.6.23
  18. Contact: Alan Stern <stern@rowland.harvard.edu>
  19. Description:
  20. If CONFIG_USB_PERSIST is set, then each USB device directory
  21. will contain a file named power/persist. The file holds a
  22. boolean value (0 or 1) indicating whether or not the
  23. "USB-Persist" facility is enabled for the device. Since the
  24. facility is inherently dangerous, it is disabled by default
  25. for all devices except hubs. For more information, see
  26. Documentation/usb/persist.txt.
  27. What: /sys/bus/usb/device/.../power/connected_duration
  28. Date: January 2008
  29. KernelVersion: 2.6.25
  30. Contact: Sarah Sharp <sarah.a.sharp@intel.com>
  31. Description:
  32. If CONFIG_PM and CONFIG_USB_SUSPEND are enabled, then this file
  33. is present. When read, it returns the total time (in msec)
  34. that the USB device has been connected to the machine. This
  35. file is read-only.
  36. Users:
  37. PowerTOP <power@bughost.org>
  38. http://www.lesswatts.org/projects/powertop/
  39. What: /sys/bus/usb/device/.../power/active_duration
  40. Date: January 2008
  41. KernelVersion: 2.6.25
  42. Contact: Sarah Sharp <sarah.a.sharp@intel.com>
  43. Description:
  44. If CONFIG_PM and CONFIG_USB_SUSPEND are enabled, then this file
  45. is present. When read, it returns the total time (in msec)
  46. that the USB device has been active, i.e. not in a suspended
  47. state. This file is read-only.
  48. Tools can use this file and the connected_duration file to
  49. compute the percentage of time that a device has been active.
  50. For example,
  51. echo $((100 * `cat active_duration` / `cat connected_duration`))
  52. will give an integer percentage. Note that this does not
  53. account for counter wrap.
  54. Users:
  55. PowerTOP <power@bughost.org>
  56. http://www.lesswatts.org/projects/powertop/
  57. What: /sys/bus/usb/device/<busnum>-<devnum>...:<config num>-<interface num>/supports_autosuspend
  58. Date: January 2008
  59. KernelVersion: 2.6.27
  60. Contact: Sarah Sharp <sarah.a.sharp@intel.com>
  61. Description:
  62. When read, this file returns 1 if the interface driver
  63. for this interface supports autosuspend. It also
  64. returns 1 if no driver has claimed this interface, as an
  65. unclaimed interface will not stop the device from being
  66. autosuspended if all other interface drivers are idle.
  67. The file returns 0 if autosuspend support has not been
  68. added to the driver.
  69. Users:
  70. USB PM tool
  71. git://git.moblin.org/users/sarah/usb-pm-tool/
  72. What: /sys/bus/usb/device/.../authorized
  73. Date: July 2008
  74. KernelVersion: 2.6.26
  75. Contact: David Vrabel <david.vrabel@csr.com>
  76. Description:
  77. Authorized devices are available for use by device
  78. drivers, non-authorized one are not. By default, wired
  79. USB devices are authorized.
  80. Certified Wireless USB devices are not authorized
  81. initially and should be (by writing 1) after the
  82. device has been authenticated.
  83. What: /sys/bus/usb/device/.../wusb_cdid
  84. Date: July 2008
  85. KernelVersion: 2.6.27
  86. Contact: David Vrabel <david.vrabel@csr.com>
  87. Description:
  88. For Certified Wireless USB devices only.
  89. A devices's CDID, as 16 space-separated hex octets.
  90. What: /sys/bus/usb/device/.../wusb_ck
  91. Date: July 2008
  92. KernelVersion: 2.6.27
  93. Contact: David Vrabel <david.vrabel@csr.com>
  94. Description:
  95. For Certified Wireless USB devices only.
  96. Write the device's connection key (CK) to start the
  97. authentication of the device. The CK is 16
  98. space-separated hex octets.
  99. What: /sys/bus/usb/device/.../wusb_disconnect
  100. Date: July 2008
  101. KernelVersion: 2.6.27
  102. Contact: David Vrabel <david.vrabel@csr.com>
  103. Description:
  104. For Certified Wireless USB devices only.
  105. Write a 1 to force the device to disconnect
  106. (equivalent to unplugging a wired USB device).
  107. What: /sys/bus/usb/drivers/.../new_id
  108. Date: October 2011
  109. Contact: linux-usb@vger.kernel.org
  110. Description:
  111. Writing a device ID to this file will attempt to
  112. dynamically add a new device ID to a USB device driver.
  113. This may allow the driver to support more hardware than
  114. was included in the driver's static device ID support
  115. table at compile time. The format for the device ID is:
  116. idVendor idProduct bInterfaceClass.
  117. The vendor ID and device ID fields are required, the
  118. interface class is optional.
  119. Upon successfully adding an ID, the driver will probe
  120. for the device and attempt to bind to it. For example:
  121. # echo "8086 10f5" > /sys/bus/usb/drivers/foo/new_id
  122. What: /sys/bus/usb-serial/drivers/.../new_id
  123. Date: October 2011
  124. Contact: linux-usb@vger.kernel.org
  125. Description:
  126. For serial USB drivers, this attribute appears under the
  127. extra bus folder "usb-serial" in sysfs; apart from that
  128. difference, all descriptions from the entry
  129. "/sys/bus/usb/drivers/.../new_id" apply.
  130. What: /sys/bus/usb/drivers/.../remove_id
  131. Date: November 2009
  132. Contact: CHENG Renquan <rqcheng@smu.edu.sg>
  133. Description:
  134. Writing a device ID to this file will remove an ID
  135. that was dynamically added via the new_id sysfs entry.
  136. The format for the device ID is:
  137. idVendor idProduct. After successfully
  138. removing an ID, the driver will no longer support the
  139. device. This is useful to ensure auto probing won't
  140. match the driver to the device. For example:
  141. # echo "046d c315" > /sys/bus/usb/drivers/foo/remove_id
  142. What: /sys/bus/usb/device/.../avoid_reset_quirk
  143. Date: December 2009
  144. Contact: Oliver Neukum <oliver@neukum.org>
  145. Description:
  146. Writing 1 to this file tells the kernel that this
  147. device will morph into another mode when it is reset.
  148. Drivers will not use reset for error handling for
  149. such devices.
  150. Users:
  151. usb_modeswitch
  152. What: /sys/bus/usb/devices/.../power/usb2_hardware_lpm
  153. Date: September 2011
  154. Contact: Andiry Xu <andiry.xu@amd.com>
  155. Description:
  156. If CONFIG_USB_SUSPEND is set and a USB 2.0 lpm-capable device
  157. is plugged in to a xHCI host which support link PM, it will
  158. perform a LPM test; if the test is passed and host supports
  159. USB2 hardware LPM (xHCI 1.0 feature), USB2 hardware LPM will
  160. be enabled for the device and the USB device directory will
  161. contain a file named power/usb2_hardware_lpm. The file holds
  162. a string value (enable or disable) indicating whether or not
  163. USB2 hardware LPM is enabled for the device. Developer can
  164. write y/Y/1 or n/N/0 to the file to enable/disable the
  165. feature.
  166. What: /sys/bus/usb/devices/.../removable
  167. Date: February 2012
  168. Contact: Matthew Garrett <mjg@redhat.com>
  169. Description:
  170. Some information about whether a given USB device is
  171. physically fixed to the platform can be inferred from a
  172. combination of hub decriptor bits and platform-specific data
  173. such as ACPI. This file will read either "removable" or
  174. "fixed" if the information is available, and "unknown"
  175. otherwise.