sysfs-bus-usb 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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/level
  16. Date: March 2007
  17. KernelVersion: 2.6.21
  18. Contact: Alan Stern <stern@rowland.harvard.edu>
  19. Description:
  20. Each USB device directory will contain a file named
  21. power/level. This file holds a power-level setting for
  22. the device, either "on" or "auto".
  23. "on" means that the device is not allowed to autosuspend,
  24. although normal suspends for system sleep will still
  25. be honored. "auto" means the device will autosuspend
  26. and autoresume in the usual manner, according to the
  27. capabilities of its driver.
  28. During normal use, devices should be left in the "auto"
  29. level. The "on" level is meant for administrative uses.
  30. If you want to suspend a device immediately but leave it
  31. free to wake up in response to I/O requests, you should
  32. write "0" to power/autosuspend.
  33. Device not capable of proper suspend and resume should be
  34. left in the "on" level. Although the USB spec requires
  35. devices to support suspend/resume, many of them do not.
  36. In fact so many don't that by default, the USB core
  37. initializes all non-hub devices in the "on" level. Some
  38. drivers may change this setting when they are bound.
  39. What: /sys/bus/usb/devices/.../power/persist
  40. Date: May 2007
  41. KernelVersion: 2.6.23
  42. Contact: Alan Stern <stern@rowland.harvard.edu>
  43. Description:
  44. If CONFIG_USB_PERSIST is set, then each USB device directory
  45. will contain a file named power/persist. The file holds a
  46. boolean value (0 or 1) indicating whether or not the
  47. "USB-Persist" facility is enabled for the device. Since the
  48. facility is inherently dangerous, it is disabled by default
  49. for all devices except hubs. For more information, see
  50. Documentation/usb/persist.txt.
  51. What: /sys/bus/usb/device/.../power/connected_duration
  52. Date: January 2008
  53. KernelVersion: 2.6.25
  54. Contact: Sarah Sharp <sarah.a.sharp@intel.com>
  55. Description:
  56. If CONFIG_PM and CONFIG_USB_SUSPEND are enabled, then this file
  57. is present. When read, it returns the total time (in msec)
  58. that the USB device has been connected to the machine. This
  59. file is read-only.
  60. Users:
  61. PowerTOP <power@bughost.org>
  62. http://www.lesswatts.org/projects/powertop/
  63. What: /sys/bus/usb/device/.../power/active_duration
  64. Date: January 2008
  65. KernelVersion: 2.6.25
  66. Contact: Sarah Sharp <sarah.a.sharp@intel.com>
  67. Description:
  68. If CONFIG_PM and CONFIG_USB_SUSPEND are enabled, then this file
  69. is present. When read, it returns the total time (in msec)
  70. that the USB device has been active, i.e. not in a suspended
  71. state. This file is read-only.
  72. Tools can use this file and the connected_duration file to
  73. compute the percentage of time that a device has been active.
  74. For example,
  75. echo $((100 * `cat active_duration` / `cat connected_duration`))
  76. will give an integer percentage. Note that this does not
  77. account for counter wrap.
  78. Users:
  79. PowerTOP <power@bughost.org>
  80. http://www.lesswatts.org/projects/powertop/
  81. What: /sys/bus/usb/device/<busnum>-<devnum>...:<config num>-<interface num>/supports_autosuspend
  82. Date: January 2008
  83. KernelVersion: 2.6.27
  84. Contact: Sarah Sharp <sarah.a.sharp@intel.com>
  85. Description:
  86. When read, this file returns 1 if the interface driver
  87. for this interface supports autosuspend. It also
  88. returns 1 if no driver has claimed this interface, as an
  89. unclaimed interface will not stop the device from being
  90. autosuspended if all other interface drivers are idle.
  91. The file returns 0 if autosuspend support has not been
  92. added to the driver.
  93. Users:
  94. USB PM tool
  95. git://git.moblin.org/users/sarah/usb-pm-tool/
  96. What: /sys/bus/usb/device/.../authorized
  97. Date: July 2008
  98. KernelVersion: 2.6.26
  99. Contact: David Vrabel <david.vrabel@csr.com>
  100. Description:
  101. Authorized devices are available for use by device
  102. drivers, non-authorized one are not. By default, wired
  103. USB devices are authorized.
  104. Certified Wireless USB devices are not authorized
  105. initially and should be (by writing 1) after the
  106. device has been authenticated.
  107. What: /sys/bus/usb/device/.../wusb_cdid
  108. Date: July 2008
  109. KernelVersion: 2.6.27
  110. Contact: David Vrabel <david.vrabel@csr.com>
  111. Description:
  112. For Certified Wireless USB devices only.
  113. A devices's CDID, as 16 space-separated hex octets.
  114. What: /sys/bus/usb/device/.../wusb_ck
  115. Date: July 2008
  116. KernelVersion: 2.6.27
  117. Contact: David Vrabel <david.vrabel@csr.com>
  118. Description:
  119. For Certified Wireless USB devices only.
  120. Write the device's connection key (CK) to start the
  121. authentication of the device. The CK is 16
  122. space-separated hex octets.
  123. What: /sys/bus/usb/device/.../wusb_disconnect
  124. Date: July 2008
  125. KernelVersion: 2.6.27
  126. Contact: David Vrabel <david.vrabel@csr.com>
  127. Description:
  128. For Certified Wireless USB devices only.
  129. Write a 1 to force the device to disconnect
  130. (equivalent to unplugging a wired USB device).
  131. What: /sys/bus/usb/drivers/.../remove_id
  132. Date: November 2009
  133. Contact: CHENG Renquan <rqcheng@smu.edu.sg>
  134. Description:
  135. Writing a device ID to this file will remove an ID
  136. that was dynamically added via the new_id sysfs entry.
  137. The format for the device ID is:
  138. idVendor idProduct. After successfully
  139. removing an ID, the driver will no longer support the
  140. device. This is useful to ensure auto probing won't
  141. match the driver to the device. For example:
  142. # echo "046d c315" > /sys/bus/usb/drivers/foo/remove_id