1eaafbc3aSAlan SternWhat:		/sys/bus/usb/devices/.../power/autosuspend
2eaafbc3aSAlan SternDate:		March 2007
3eaafbc3aSAlan SternKernelVersion:	2.6.21
4eaafbc3aSAlan SternContact:	Alan Stern <stern@rowland.harvard.edu>
5eaafbc3aSAlan SternDescription:
6eaafbc3aSAlan Stern		Each USB device directory will contain a file named
7eaafbc3aSAlan Stern		power/autosuspend.  This file holds the time (in seconds)
8eaafbc3aSAlan Stern		the device must be idle before it will be autosuspended.
9eaafbc3aSAlan Stern		0 means the device will be autosuspended as soon as
10eaafbc3aSAlan Stern		possible.  Negative values will prevent the device from
11eaafbc3aSAlan Stern		being autosuspended at all, and writing a negative value
12eaafbc3aSAlan Stern		will resume the device if it is already suspended.
13eaafbc3aSAlan Stern
14eaafbc3aSAlan Stern		The autosuspend delay for newly-created devices is set to
15eaafbc3aSAlan Stern		the value of the usbcore.autosuspend module parameter.
162add5229SAlan Stern
17b41a60ecSAlan SternWhat:		/sys/bus/usb/devices/.../power/persist
18b41a60ecSAlan SternDate:		May 2007
19b41a60ecSAlan SternKernelVersion:	2.6.23
20b41a60ecSAlan SternContact:	Alan Stern <stern@rowland.harvard.edu>
21b41a60ecSAlan SternDescription:
22b41a60ecSAlan Stern		If CONFIG_USB_PERSIST is set, then each USB device directory
23b41a60ecSAlan Stern		will contain a file named power/persist.  The file holds a
24b41a60ecSAlan Stern		boolean value (0 or 1) indicating whether or not the
25b41a60ecSAlan Stern		"USB-Persist" facility is enabled for the device.  Since the
26b41a60ecSAlan Stern		facility is inherently dangerous, it is disabled by default
27b41a60ecSAlan Stern		for all devices except hubs.  For more information, see
28b41a60ecSAlan Stern		Documentation/usb/persist.txt.
29979e524aSSarah Sharp
30979e524aSSarah SharpWhat:		/sys/bus/usb/device/.../power/connected_duration
31979e524aSSarah SharpDate:		January 2008
32979e524aSSarah SharpKernelVersion:	2.6.25
33979e524aSSarah SharpContact:	Sarah Sharp <sarah.a.sharp@intel.com>
34979e524aSSarah SharpDescription:
354e9c8e5cSAlan Stern		If CONFIG_PM_RUNTIME is enabled then this file
36979e524aSSarah Sharp		is present.  When read, it returns the total time (in msec)
37979e524aSSarah Sharp		that the USB device has been connected to the machine.  This
38979e524aSSarah Sharp		file is read-only.
39979e524aSSarah SharpUsers:
40979e524aSSarah Sharp		PowerTOP <power@bughost.org>
41979e524aSSarah Sharp		http://www.lesswatts.org/projects/powertop/
42979e524aSSarah Sharp
43979e524aSSarah SharpWhat:		/sys/bus/usb/device/.../power/active_duration
44979e524aSSarah SharpDate:		January 2008
45979e524aSSarah SharpKernelVersion:	2.6.25
46979e524aSSarah SharpContact:	Sarah Sharp <sarah.a.sharp@intel.com>
47979e524aSSarah SharpDescription:
484e9c8e5cSAlan Stern		If CONFIG_PM_RUNTIME is enabled then this file
49979e524aSSarah Sharp		is present.  When read, it returns the total time (in msec)
50979e524aSSarah Sharp		that the USB device has been active, i.e. not in a suspended
51979e524aSSarah Sharp		state.  This file is read-only.
52979e524aSSarah Sharp
53979e524aSSarah Sharp		Tools can use this file and the connected_duration file to
54979e524aSSarah Sharp		compute the percentage of time that a device has been active.
55979e524aSSarah Sharp		For example,
56979e524aSSarah Sharp		echo $((100 * `cat active_duration` / `cat connected_duration`))
57979e524aSSarah Sharp		will give an integer percentage.  Note that this does not
58979e524aSSarah Sharp		account for counter wrap.
59979e524aSSarah SharpUsers:
60979e524aSSarah Sharp		PowerTOP <power@bughost.org>
61979e524aSSarah Sharp		http://www.lesswatts.org/projects/powertop/
62c8cf2465SDavid Vrabel
6349e7cc84SSarah SharpWhat:		/sys/bus/usb/device/<busnum>-<devnum>...:<config num>-<interface num>/supports_autosuspend
6449e7cc84SSarah SharpDate:		January 2008
6549e7cc84SSarah SharpKernelVersion:	2.6.27
6649e7cc84SSarah SharpContact:	Sarah Sharp <sarah.a.sharp@intel.com>
6749e7cc84SSarah SharpDescription:
6849e7cc84SSarah Sharp		When read, this file returns 1 if the interface driver
6949e7cc84SSarah Sharp		for this interface supports autosuspend.  It also
7049e7cc84SSarah Sharp		returns 1 if no driver has claimed this interface, as an
7149e7cc84SSarah Sharp		unclaimed interface will not stop the device from being
7249e7cc84SSarah Sharp		autosuspended if all other interface drivers are idle.
7349e7cc84SSarah Sharp		The file returns 0 if autosuspend support has not been
7449e7cc84SSarah Sharp		added to the driver.
7549e7cc84SSarah SharpUsers:
7649e7cc84SSarah Sharp		USB PM tool
7749e7cc84SSarah Sharp		git://git.moblin.org/users/sarah/usb-pm-tool/
7861e0e79eSDavid Vrabel
79c8cf2465SDavid VrabelWhat:		/sys/bus/usb/device/.../authorized
80c8cf2465SDavid VrabelDate:		July 2008
81c8cf2465SDavid VrabelKernelVersion:	2.6.26
82c8cf2465SDavid VrabelContact:	David Vrabel <david.vrabel@csr.com>
83c8cf2465SDavid VrabelDescription:
84c8cf2465SDavid Vrabel		Authorized devices are available for use by device
85c8cf2465SDavid Vrabel		drivers, non-authorized one are not.  By default, wired
86c8cf2465SDavid Vrabel		USB devices are authorized.
87c8cf2465SDavid Vrabel
88c8cf2465SDavid Vrabel		Certified Wireless USB devices are not authorized
89c8cf2465SDavid Vrabel		initially and should be (by writing 1) after the
90c8cf2465SDavid Vrabel		device has been authenticated.
91c8cf2465SDavid Vrabel
92c8cf2465SDavid VrabelWhat:		/sys/bus/usb/device/.../wusb_cdid
93c8cf2465SDavid VrabelDate:		July 2008
94c8cf2465SDavid VrabelKernelVersion:	2.6.27
95c8cf2465SDavid VrabelContact:	David Vrabel <david.vrabel@csr.com>
96c8cf2465SDavid VrabelDescription:
97c8cf2465SDavid Vrabel		For Certified Wireless USB devices only.
98c8cf2465SDavid Vrabel
99c8cf2465SDavid Vrabel		A devices's CDID, as 16 space-separated hex octets.
100c8cf2465SDavid Vrabel
101c8cf2465SDavid VrabelWhat:		/sys/bus/usb/device/.../wusb_ck
102c8cf2465SDavid VrabelDate:		July 2008
103c8cf2465SDavid VrabelKernelVersion:	2.6.27
104c8cf2465SDavid VrabelContact:	David Vrabel <david.vrabel@csr.com>
105c8cf2465SDavid VrabelDescription:
106c8cf2465SDavid Vrabel		For Certified Wireless USB devices only.
107c8cf2465SDavid Vrabel
108c8cf2465SDavid Vrabel		Write the device's connection key (CK) to start the
109c8cf2465SDavid Vrabel		authentication of the device.  The CK is 16
110c8cf2465SDavid Vrabel		space-separated hex octets.
111c8cf2465SDavid Vrabel
112c8cf2465SDavid VrabelWhat:		/sys/bus/usb/device/.../wusb_disconnect
113c8cf2465SDavid VrabelDate:		July 2008
114c8cf2465SDavid VrabelKernelVersion:	2.6.27
115c8cf2465SDavid VrabelContact:	David Vrabel <david.vrabel@csr.com>
116c8cf2465SDavid VrabelDescription:
117c8cf2465SDavid Vrabel		For Certified Wireless USB devices only.
118c8cf2465SDavid Vrabel
119c8cf2465SDavid Vrabel		Write a 1 to force the device to disconnect
120c8cf2465SDavid Vrabel		(equivalent to unplugging a wired USB device).
1210c7a2b72SCHENG Renquan
122ff231db8SJosua DietzeWhat:		/sys/bus/usb/drivers/.../new_id
123ff231db8SJosua DietzeDate:		October 2011
124ff231db8SJosua DietzeContact:	linux-usb@vger.kernel.org
125ff231db8SJosua DietzeDescription:
126ff231db8SJosua Dietze		Writing a device ID to this file will attempt to
127ff231db8SJosua Dietze		dynamically add a new device ID to a USB device driver.
128ff231db8SJosua Dietze		This may allow the driver to support more hardware than
129ff231db8SJosua Dietze		was included in the driver's static device ID support
130ff231db8SJosua Dietze		table at compile time. The format for the device ID is:
131ff231db8SJosua Dietze		idVendor idProduct bInterfaceClass.
132ff231db8SJosua Dietze		The vendor ID and device ID fields are required, the
133ff231db8SJosua Dietze		interface class is optional.
134ff231db8SJosua Dietze		Upon successfully adding an ID, the driver will probe
135ff231db8SJosua Dietze		for the device and attempt to bind to it.  For example:
136ff231db8SJosua Dietze		# echo "8086 10f5" > /sys/bus/usb/drivers/foo/new_id
137ff231db8SJosua Dietze
138e6bbcef0SBjørn Mork		Reading from this file will list all dynamically added
139e6bbcef0SBjørn Mork		device IDs in the same format, with one entry per
140e6bbcef0SBjørn Mork		line. For example:
141e6bbcef0SBjørn Mork		# cat /sys/bus/usb/drivers/foo/new_id
142e6bbcef0SBjørn Mork		8086 10f5
143e6bbcef0SBjørn Mork		dead beef 06
144e6bbcef0SBjørn Mork		f00d cafe
145e6bbcef0SBjørn Mork
146e6bbcef0SBjørn Mork		The list will be truncated at PAGE_SIZE bytes due to
147e6bbcef0SBjørn Mork		sysfs restrictions.
148e6bbcef0SBjørn Mork
149ff231db8SJosua DietzeWhat:		/sys/bus/usb-serial/drivers/.../new_id
150ff231db8SJosua DietzeDate:		October 2011
151ff231db8SJosua DietzeContact:	linux-usb@vger.kernel.org
152ff231db8SJosua DietzeDescription:
153ff231db8SJosua Dietze		For serial USB drivers, this attribute appears under the
154ff231db8SJosua Dietze		extra bus folder "usb-serial" in sysfs; apart from that
155ff231db8SJosua Dietze		difference, all descriptions from the entry
156ff231db8SJosua Dietze		"/sys/bus/usb/drivers/.../new_id" apply.
157ff231db8SJosua Dietze
1580c7a2b72SCHENG RenquanWhat:		/sys/bus/usb/drivers/.../remove_id
1590c7a2b72SCHENG RenquanDate:		November 2009
1600c7a2b72SCHENG RenquanContact:	CHENG Renquan <rqcheng@smu.edu.sg>
1610c7a2b72SCHENG RenquanDescription:
1620c7a2b72SCHENG Renquan		Writing a device ID to this file will remove an ID
1630c7a2b72SCHENG Renquan		that was dynamically added via the new_id sysfs entry.
1640c7a2b72SCHENG Renquan		The format for the device ID is:
1650c7a2b72SCHENG Renquan		idVendor idProduct.	After successfully
1660c7a2b72SCHENG Renquan		removing an ID, the driver will no longer support the
1670c7a2b72SCHENG Renquan		device.  This is useful to ensure auto probing won't
1680c7a2b72SCHENG Renquan		match the driver to the device.  For example:
1690c7a2b72SCHENG Renquan		# echo "046d c315" > /sys/bus/usb/drivers/foo/remove_id
170ef955341SOliver Neukum
171e6bbcef0SBjørn Mork		Reading from this file will list the dynamically added
172e6bbcef0SBjørn Mork		device IDs, exactly like reading from the entry
173e6bbcef0SBjørn Mork		"/sys/bus/usb/drivers/.../new_id"
174e6bbcef0SBjørn Mork
1751e63ef0eSOliver NeukumWhat:		/sys/bus/usb/device/.../avoid_reset_quirk
176ef955341SOliver NeukumDate:		December 2009
177ef955341SOliver NeukumContact:	Oliver Neukum <oliver@neukum.org>
178ef955341SOliver NeukumDescription:
179ef955341SOliver Neukum		Writing 1 to this file tells the kernel that this
180ef955341SOliver Neukum		device will morph into another mode when it is reset.
181ef955341SOliver Neukum		Drivers will not use reset for error handling for
182ef955341SOliver Neukum		such devices.
183ef955341SOliver NeukumUsers:
184ef955341SOliver Neukum		usb_modeswitch
185c1045e87SAndiry Xu
186c1045e87SAndiry XuWhat:		/sys/bus/usb/devices/.../power/usb2_hardware_lpm
187c1045e87SAndiry XuDate:		September 2011
188c1045e87SAndiry XuContact:	Andiry Xu <andiry.xu@amd.com>
189c1045e87SAndiry XuDescription:
1904e9c8e5cSAlan Stern		If CONFIG_PM_RUNTIME is set and a USB 2.0 lpm-capable device
191c1045e87SAndiry Xu		is plugged in to a xHCI host which support link PM, it will
192c1045e87SAndiry Xu		perform a LPM test; if the test is passed and host supports
193c1045e87SAndiry Xu		USB2 hardware LPM (xHCI 1.0 feature), USB2 hardware LPM will
194c1045e87SAndiry Xu		be enabled for the device and the USB device directory will
195c1045e87SAndiry Xu		contain a file named power/usb2_hardware_lpm.  The file holds
196c1045e87SAndiry Xu		a string value (enable or disable) indicating whether or not
197c1045e87SAndiry Xu		USB2 hardware LPM is enabled for the device. Developer can
198c1045e87SAndiry Xu		write y/Y/1 or n/N/0 to the file to enable/disable the
199c1045e87SAndiry Xu		feature.
2000846e7e9SMatthew Garrett
2010846e7e9SMatthew GarrettWhat:		/sys/bus/usb/devices/.../removable
2020846e7e9SMatthew GarrettDate:		February 2012
2030846e7e9SMatthew GarrettContact:	Matthew Garrett <mjg@redhat.com>
2040846e7e9SMatthew GarrettDescription:
2050846e7e9SMatthew Garrett		Some information about whether a given USB device is
2060846e7e9SMatthew Garrett		physically fixed to the platform can be inferred from a
207c94bed8eSMasanari Iida		combination of hub descriptor bits and platform-specific data
2080846e7e9SMatthew Garrett		such as ACPI. This file will read either "removable" or
2090846e7e9SMatthew Garrett		"fixed" if the information is available, and "unknown"
2100846e7e9SMatthew Garrett		otherwise.
211024f117cSSarah Sharp
212024f117cSSarah SharpWhat:		/sys/bus/usb/devices/.../ltm_capable
213024f117cSSarah SharpDate:		July 2012
214024f117cSSarah SharpContact:	Sarah Sharp <sarah.a.sharp@linux.intel.com>
215024f117cSSarah SharpDescription:
216024f117cSSarah Sharp		USB 3.0 devices may optionally support Latency Tolerance
217024f117cSSarah Sharp		Messaging (LTM).  They indicate their support by setting a bit
218024f117cSSarah Sharp		in the bmAttributes field of their SuperSpeed BOS descriptors.
219024f117cSSarah Sharp		If that bit is set for the device, ltm_capable will read "yes".
220024f117cSSarah Sharp		If the device doesn't support LTM, the file will read "no".
221024f117cSSarah Sharp		The file will be present for all speeds of USB devices, and will
222024f117cSSarah Sharp		always read "no" for USB 1.1 and USB 2.0 devices.
223fa2a9566SLan Tianyu
224fa2a9566SLan TianyuWhat:		/sys/bus/usb/devices/.../(hub interface)/portX
225fa2a9566SLan TianyuDate:		August 2012
226fa2a9566SLan TianyuContact:	Lan Tianyu <tianyu.lan@intel.com>
227fa2a9566SLan TianyuDescription:
228fa2a9566SLan Tianyu		The /sys/bus/usb/devices/.../(hub interface)/portX
229fa2a9566SLan Tianyu		is usb port device's sysfs directory.
230cef7468cSLan Tianyu
231cef7468cSLan TianyuWhat:		/sys/bus/usb/devices/.../(hub interface)/portX/connect_type
232cef7468cSLan TianyuDate:		January 2013
233cef7468cSLan TianyuContact:	Lan Tianyu <tianyu.lan@intel.com>
234cef7468cSLan TianyuDescription:
235cef7468cSLan Tianyu		Some platforms provide usb port connect types through ACPI.
236cef7468cSLan Tianyu		This attribute is to expose these information to user space.
237cef7468cSLan Tianyu		The file will read "hotplug", "wired" and "not used" if the
238cef7468cSLan Tianyu		information is available, and "unknown" otherwise.
23917f34867SMathias Nyman
24017f34867SMathias NymanWhat:		/sys/bus/usb/devices/.../power/usb2_lpm_l1_timeout
24117f34867SMathias NymanDate:		May 2013
24217f34867SMathias NymanContact:	Mathias Nyman <mathias.nyman@linux.intel.com>
24317f34867SMathias NymanDescription:
24417f34867SMathias Nyman		USB 2.0 devices may support hardware link power management (LPM)
24517f34867SMathias Nyman		L1 sleep state. The usb2_lpm_l1_timeout attribute allows
24617f34867SMathias Nyman		tuning the timeout for L1 inactivity timer (LPM timer), e.g.
24717f34867SMathias Nyman		needed inactivity time before host requests the device to go to L1 sleep.
24817f34867SMathias Nyman		Useful for power management tuning.
24917f34867SMathias Nyman		Supported values are 0 - 65535 microseconds.
25017f34867SMathias Nyman
25117f34867SMathias NymanWhat:		/sys/bus/usb/devices/.../power/usb2_lpm_besl
25217f34867SMathias NymanDate:		May 2013
25317f34867SMathias NymanContact:	Mathias Nyman <mathias.nyman@linux.intel.com>
25417f34867SMathias NymanDescription:
25517f34867SMathias Nyman		USB 2.0 devices that support hardware link power management (LPM)
25617f34867SMathias Nyman		L1 sleep state now use a best effort service latency value (BESL) to
25717f34867SMathias Nyman		indicate the best effort to resumption of service to the device after the
25817f34867SMathias Nyman		initiation of the resume event.
25917f34867SMathias Nyman		If the device does not have a preferred besl value then the host can select
26017f34867SMathias Nyman		one instead. This usb2_lpm_besl attribute allows to tune the host selected besl
26117f34867SMathias Nyman		value in order to tune power saving and service latency.
26217f34867SMathias Nyman
26317f34867SMathias Nyman		Supported values are 0 - 15.
26417f34867SMathias Nyman		More information on how besl values map to microseconds can be found in
26517f34867SMathias Nyman		USB 2.0 ECN Errata for Link Power Management, section 4.10)
266