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. USB device directories can contain a file named power/persist.
  7. The file holds a boolean value (0 or 1) indicating whether or
  8. not the "USB-Persist" facility is enabled for the device. For
  9. hubs this facility is always enabled and their device
  10. directories will not contain this file.
  11. For more information, see Documentation/usb/persist.txt.
  12. What: /sys/bus/usb/devices/.../power/autosuspend
  13. Date: March 2007
  14. KernelVersion: 2.6.21
  15. Contact: Alan Stern <stern@rowland.harvard.edu>
  16. Description:
  17. Each USB device directory will contain a file named
  18. power/autosuspend. This file holds the time (in seconds)
  19. the device must be idle before it will be autosuspended.
  20. 0 means the device will be autosuspended as soon as
  21. possible. Negative values will prevent the device from
  22. being autosuspended at all, and writing a negative value
  23. will resume the device if it is already suspended.
  24. The autosuspend delay for newly-created devices is set to
  25. the value of the usbcore.autosuspend module parameter.
  26. What: /sys/bus/usb/device/.../power/connected_duration
  27. Date: January 2008
  28. KernelVersion: 2.6.25
  29. Contact: Sarah Sharp <sarah.a.sharp@intel.com>
  30. Description:
  31. If CONFIG_PM_RUNTIME is enabled then this file
  32. is present. When read, it returns the total time (in msec)
  33. that the USB device has been connected to the machine. This
  34. file is read-only.
  35. Users:
  36. PowerTOP <powertop@lists.01.org>
  37. https://01.org/powertop/
  38. What: /sys/bus/usb/device/.../power/active_duration
  39. Date: January 2008
  40. KernelVersion: 2.6.25
  41. Contact: Sarah Sharp <sarah.a.sharp@intel.com>
  42. Description:
  43. If CONFIG_PM_RUNTIME is enabled then this file
  44. is present. When read, it returns the total time (in msec)
  45. that the USB device has been active, i.e. not in a suspended
  46. state. This file is read-only.
  47. Tools can use this file and the connected_duration file to
  48. compute the percentage of time that a device has been active.
  49. For example,
  50. echo $((100 * `cat active_duration` / `cat connected_duration`))
  51. will give an integer percentage. Note that this does not
  52. account for counter wrap.
  53. Users:
  54. PowerTOP <powertop@lists.01.org>
  55. https://01.org/powertop/
  56. What: /sys/bus/usb/devices/<busnum>-<port[.port]>...:<config num>-<interface num>/supports_autosuspend
  57. Date: January 2008
  58. KernelVersion: 2.6.27
  59. Contact: Sarah Sharp <sarah.a.sharp@intel.com>
  60. Description:
  61. When read, this file returns 1 if the interface driver
  62. for this interface supports autosuspend. It also
  63. returns 1 if no driver has claimed this interface, as an
  64. unclaimed interface will not stop the device from being
  65. autosuspended if all other interface drivers are idle.
  66. The file returns 0 if autosuspend support has not been
  67. added to the driver.
  68. Users:
  69. USB PM tool
  70. git://git.moblin.org/users/sarah/usb-pm-tool/
  71. What: /sys/bus/usb/device/.../avoid_reset_quirk
  72. Date: December 2009
  73. Contact: Oliver Neukum <oliver@neukum.org>
  74. Description:
  75. Writing 1 to this file tells the kernel that this
  76. device will morph into another mode when it is reset.
  77. Drivers will not use reset for error handling for
  78. such devices.
  79. Users:
  80. usb_modeswitch
  81. What: /sys/bus/usb/devices/.../devnum
  82. KernelVersion: since at least 2.6.18
  83. Description:
  84. Device address on the USB bus.
  85. Users:
  86. libusb
  87. What: /sys/bus/usb/devices/.../bConfigurationValue
  88. KernelVersion: since at least 2.6.18
  89. Description:
  90. bConfigurationValue of the *active* configuration for the
  91. device. Writing 0 or -1 to bConfigurationValue will reset the
  92. active configuration (unconfigure the device). Writing
  93. another value will change the active configuration.
  94. Note that some devices, in violation of the USB spec, have a
  95. configuration with a value equal to 0. Writing 0 to
  96. bConfigurationValue for these devices will install that
  97. configuration, rather then unconfigure the device.
  98. Writing -1 will always unconfigure the device.
  99. Users:
  100. libusb
  101. What: /sys/bus/usb/devices/.../busnum
  102. KernelVersion: 2.6.22
  103. Description:
  104. Bus-number of the USB-bus the device is connected to.
  105. Users:
  106. libusb
  107. What: /sys/bus/usb/devices/.../descriptors
  108. KernelVersion: 2.6.26
  109. Description:
  110. Binary file containing cached descriptors of the device. The
  111. binary data consists of the device descriptor followed by the
  112. descriptors for each configuration of the device.
  113. Note that the wTotalLength of the config descriptors can not
  114. be trusted, as the device may have a smaller config descriptor
  115. than it advertises. The bLength field of each (sub) descriptor
  116. can be trusted, and can be used to seek forward one (sub)
  117. descriptor at a time until the next config descriptor is found.
  118. All descriptors read from this file are in bus-endian format
  119. Users:
  120. libusb
  121. What: /sys/bus/usb/devices/.../speed
  122. KernelVersion: since at least 2.6.18
  123. Description:
  124. Speed the device is connected with to the usb-host in
  125. Mbit / second. IE one of 1.5 / 12 / 480 / 5000.
  126. Users:
  127. libusb