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