sysfs-bus-usb 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. What: /sys/bus/usb/devices/.../power/persist
  2. Date: May 2007
  3. KernelVersion: 2.6.23
  4. Contact: Alan Stern <stern@rowland.harvard.edu>
  5. Description:
  6. If CONFIG_USB_PERSIST is set, then each USB device directory
  7. will contain a file named power/persist. The file holds a
  8. boolean value (0 or 1) indicating whether or not the
  9. "USB-Persist" facility is enabled for the device. Since the
  10. facility is inherently dangerous, it is disabled by default
  11. for all devices except hubs. For more information, see
  12. Documentation/usb/persist.txt.
  13. What: /sys/bus/usb/devices/.../power/autosuspend
  14. Date: March 2007
  15. KernelVersion: 2.6.21
  16. Contact: Alan Stern <stern@rowland.harvard.edu>
  17. Description:
  18. Each USB device directory will contain a file named
  19. power/autosuspend. This file holds the time (in seconds)
  20. the device must be idle before it will be autosuspended.
  21. 0 means the device will be autosuspended as soon as
  22. possible. Negative values will prevent the device from
  23. being autosuspended at all, and writing a negative value
  24. will resume the device if it is already suspended.
  25. The autosuspend delay for newly-created devices is set to
  26. the value of the usbcore.autosuspend module parameter.
  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_RUNTIME is 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_RUNTIME is 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/devices/<busnum>-<port[.port]>...:<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/.../avoid_reset_quirk
  73. Date: December 2009
  74. Contact: Oliver Neukum <oliver@neukum.org>
  75. Description:
  76. Writing 1 to this file tells the kernel that this
  77. device will morph into another mode when it is reset.
  78. Drivers will not use reset for error handling for
  79. such devices.
  80. Users:
  81. usb_modeswitch
  82. What: /sys/bus/usb/devices/.../devnum
  83. KernelVersion: since at least 2.6.18
  84. Description:
  85. Device address on the USB bus.
  86. Users:
  87. libusb
  88. What: /sys/bus/usb/devices/.../bConfigurationValue
  89. KernelVersion: since at least 2.6.18
  90. Description:
  91. bConfigurationValue of the *active* configuration for the
  92. device. Writing 0 or -1 to bConfigurationValue will reset the
  93. active configuration (unconfigure the device). Writing
  94. another value will change the active configuration.
  95. Note that some devices, in violation of the USB spec, have a
  96. configuration with a value equal to 0. Writing 0 to
  97. bConfigurationValue for these devices will install that
  98. configuration, rather then unconfigure the device.
  99. Writing -1 will always unconfigure the device.
  100. Users:
  101. libusb
  102. What: /sys/bus/usb/devices/.../busnum
  103. KernelVersion: 2.6.22
  104. Description:
  105. Bus-number of the USB-bus the device is connected to.
  106. Users:
  107. libusb
  108. What: /sys/bus/usb/devices/.../descriptors
  109. KernelVersion: 2.6.26
  110. Description:
  111. Binary file containing cached descriptors of the device. The
  112. binary data consists of the device descriptor followed by the
  113. descriptors for each configuration of the device.
  114. Note that the wTotalLength of the config descriptors can not
  115. be trusted, as the device may have a smaller config descriptor
  116. than it advertises. The bLength field of each (sub) descriptor
  117. can be trusted, and can be used to seek forward one (sub)
  118. descriptor at a time until the next config descriptor is found.
  119. All descriptors read from this file are in bus-endian format
  120. Users:
  121. libusb
  122. What: /sys/bus/usb/devices/.../speed
  123. KernelVersion: since at least 2.6.18
  124. Description:
  125. Speed the device is connected with to the usb-host in
  126. Mbit / second. IE one of 1.5 / 12 / 480 / 5000.
  127. Users:
  128. libusb