sysfs-bus-usb 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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. Reading from this file will list all dynamically added
  123. device IDs in the same format, with one entry per
  124. line. For example:
  125. # cat /sys/bus/usb/drivers/foo/new_id
  126. 8086 10f5
  127. dead beef 06
  128. f00d cafe
  129. The list will be truncated at PAGE_SIZE bytes due to
  130. sysfs restrictions.
  131. What: /sys/bus/usb-serial/drivers/.../new_id
  132. Date: October 2011
  133. Contact: linux-usb@vger.kernel.org
  134. Description:
  135. For serial USB drivers, this attribute appears under the
  136. extra bus folder "usb-serial" in sysfs; apart from that
  137. difference, all descriptions from the entry
  138. "/sys/bus/usb/drivers/.../new_id" apply.
  139. What: /sys/bus/usb/drivers/.../remove_id
  140. Date: November 2009
  141. Contact: CHENG Renquan <rqcheng@smu.edu.sg>
  142. Description:
  143. Writing a device ID to this file will remove an ID
  144. that was dynamically added via the new_id sysfs entry.
  145. The format for the device ID is:
  146. idVendor idProduct. After successfully
  147. removing an ID, the driver will no longer support the
  148. device. This is useful to ensure auto probing won't
  149. match the driver to the device. For example:
  150. # echo "046d c315" > /sys/bus/usb/drivers/foo/remove_id
  151. Reading from this file will list the dynamically added
  152. device IDs, exactly like reading from the entry
  153. "/sys/bus/usb/drivers/.../new_id"
  154. What: /sys/bus/usb/device/.../avoid_reset_quirk
  155. Date: December 2009
  156. Contact: Oliver Neukum <oliver@neukum.org>
  157. Description:
  158. Writing 1 to this file tells the kernel that this
  159. device will morph into another mode when it is reset.
  160. Drivers will not use reset for error handling for
  161. such devices.
  162. Users:
  163. usb_modeswitch
  164. What: /sys/bus/usb/devices/.../power/usb2_hardware_lpm
  165. Date: September 2011
  166. Contact: Andiry Xu <andiry.xu@amd.com>
  167. Description:
  168. If CONFIG_USB_SUSPEND is set and a USB 2.0 lpm-capable device
  169. is plugged in to a xHCI host which support link PM, it will
  170. perform a LPM test; if the test is passed and host supports
  171. USB2 hardware LPM (xHCI 1.0 feature), USB2 hardware LPM will
  172. be enabled for the device and the USB device directory will
  173. contain a file named power/usb2_hardware_lpm. The file holds
  174. a string value (enable or disable) indicating whether or not
  175. USB2 hardware LPM is enabled for the device. Developer can
  176. write y/Y/1 or n/N/0 to the file to enable/disable the
  177. feature.
  178. What: /sys/bus/usb/devices/.../removable
  179. Date: February 2012
  180. Contact: Matthew Garrett <mjg@redhat.com>
  181. Description:
  182. Some information about whether a given USB device is
  183. physically fixed to the platform can be inferred from a
  184. combination of hub descriptor bits and platform-specific data
  185. such as ACPI. This file will read either "removable" or
  186. "fixed" if the information is available, and "unknown"
  187. otherwise.
  188. What: /sys/bus/usb/devices/.../ltm_capable
  189. Date: July 2012
  190. Contact: Sarah Sharp <sarah.a.sharp@linux.intel.com>
  191. Description:
  192. USB 3.0 devices may optionally support Latency Tolerance
  193. Messaging (LTM). They indicate their support by setting a bit
  194. in the bmAttributes field of their SuperSpeed BOS descriptors.
  195. If that bit is set for the device, ltm_capable will read "yes".
  196. If the device doesn't support LTM, the file will read "no".
  197. The file will be present for all speeds of USB devices, and will
  198. always read "no" for USB 1.1 and USB 2.0 devices.