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
172add5229SAlan SternWhat:		/sys/bus/usb/devices/.../power/level
182add5229SAlan SternDate:		March 2007
192add5229SAlan SternKernelVersion:	2.6.21
202add5229SAlan SternContact:	Alan Stern <stern@rowland.harvard.edu>
212add5229SAlan SternDescription:
222add5229SAlan Stern		Each USB device directory will contain a file named
232add5229SAlan Stern		power/level.  This file holds a power-level setting for
242add5229SAlan Stern		the device, one of "on", "auto", or "suspend".
252add5229SAlan Stern
262add5229SAlan Stern		"on" means that the device is not allowed to autosuspend,
272add5229SAlan Stern		although normal suspends for system sleep will still
282add5229SAlan Stern		be honored.  "auto" means the device will autosuspend
292add5229SAlan Stern		and autoresume in the usual manner, according to the
302add5229SAlan Stern		capabilities of its driver.  "suspend" means the device
312add5229SAlan Stern		is forced into a suspended state and it will not autoresume
322add5229SAlan Stern		in response to I/O requests.  However remote-wakeup requests
332add5229SAlan Stern		from the device may still be enabled (the remote-wakeup
342add5229SAlan Stern		setting is controlled separately by the power/wakeup
352add5229SAlan Stern		attribute).
362add5229SAlan Stern
372add5229SAlan Stern		During normal use, devices should be left in the "auto"
382add5229SAlan Stern		level.  The other levels are meant for administrative uses.
392add5229SAlan Stern		If you want to suspend a device immediately but leave it
402add5229SAlan Stern		free to wake up in response to I/O requests, you should
412add5229SAlan Stern		write "0" to power/autosuspend.
42b41a60ecSAlan Stern
43b41a60ecSAlan SternWhat:		/sys/bus/usb/devices/.../power/persist
44b41a60ecSAlan SternDate:		May 2007
45b41a60ecSAlan SternKernelVersion:	2.6.23
46b41a60ecSAlan SternContact:	Alan Stern <stern@rowland.harvard.edu>
47b41a60ecSAlan SternDescription:
48b41a60ecSAlan Stern		If CONFIG_USB_PERSIST is set, then each USB device directory
49b41a60ecSAlan Stern		will contain a file named power/persist.  The file holds a
50b41a60ecSAlan Stern		boolean value (0 or 1) indicating whether or not the
51b41a60ecSAlan Stern		"USB-Persist" facility is enabled for the device.  Since the
52b41a60ecSAlan Stern		facility is inherently dangerous, it is disabled by default
53b41a60ecSAlan Stern		for all devices except hubs.  For more information, see
54b41a60ecSAlan Stern		Documentation/usb/persist.txt.
55979e524aSSarah Sharp
56979e524aSSarah SharpWhat:		/sys/bus/usb/device/.../power/connected_duration
57979e524aSSarah SharpDate:		January 2008
58979e524aSSarah SharpKernelVersion:	2.6.25
59979e524aSSarah SharpContact:	Sarah Sharp <sarah.a.sharp@intel.com>
60979e524aSSarah SharpDescription:
61979e524aSSarah Sharp		If CONFIG_PM and CONFIG_USB_SUSPEND are enabled, then this file
62979e524aSSarah Sharp		is present.  When read, it returns the total time (in msec)
63979e524aSSarah Sharp		that the USB device has been connected to the machine.  This
64979e524aSSarah Sharp		file is read-only.
65979e524aSSarah SharpUsers:
66979e524aSSarah Sharp		PowerTOP <power@bughost.org>
67979e524aSSarah Sharp		http://www.lesswatts.org/projects/powertop/
68979e524aSSarah Sharp
69979e524aSSarah SharpWhat:		/sys/bus/usb/device/.../power/active_duration
70979e524aSSarah SharpDate:		January 2008
71979e524aSSarah SharpKernelVersion:	2.6.25
72979e524aSSarah SharpContact:	Sarah Sharp <sarah.a.sharp@intel.com>
73979e524aSSarah SharpDescription:
74979e524aSSarah Sharp		If CONFIG_PM and CONFIG_USB_SUSPEND are enabled, then this file
75979e524aSSarah Sharp		is present.  When read, it returns the total time (in msec)
76979e524aSSarah Sharp		that the USB device has been active, i.e. not in a suspended
77979e524aSSarah Sharp		state.  This file is read-only.
78979e524aSSarah Sharp
79979e524aSSarah Sharp		Tools can use this file and the connected_duration file to
80979e524aSSarah Sharp		compute the percentage of time that a device has been active.
81979e524aSSarah Sharp		For example,
82979e524aSSarah Sharp		echo $((100 * `cat active_duration` / `cat connected_duration`))
83979e524aSSarah Sharp		will give an integer percentage.  Note that this does not
84979e524aSSarah Sharp		account for counter wrap.
85979e524aSSarah SharpUsers:
86979e524aSSarah Sharp		PowerTOP <power@bughost.org>
87979e524aSSarah Sharp		http://www.lesswatts.org/projects/powertop/
8849e7cc84SSarah Sharp
8949e7cc84SSarah SharpWhat:		/sys/bus/usb/device/<busnum>-<devnum>...:<config num>-<interface num>/supports_autosuspend
9049e7cc84SSarah SharpDate:		January 2008
9149e7cc84SSarah SharpKernelVersion:	2.6.27
9249e7cc84SSarah SharpContact:	Sarah Sharp <sarah.a.sharp@intel.com>
9349e7cc84SSarah SharpDescription:
9449e7cc84SSarah Sharp		When read, this file returns 1 if the interface driver
9549e7cc84SSarah Sharp		for this interface supports autosuspend.  It also
9649e7cc84SSarah Sharp		returns 1 if no driver has claimed this interface, as an
9749e7cc84SSarah Sharp		unclaimed interface will not stop the device from being
9849e7cc84SSarah Sharp		autosuspended if all other interface drivers are idle.
9949e7cc84SSarah Sharp		The file returns 0 if autosuspend support has not been
10049e7cc84SSarah Sharp		added to the driver.
10149e7cc84SSarah SharpUsers:
10249e7cc84SSarah Sharp		USB PM tool
10349e7cc84SSarah Sharp		git://git.moblin.org/users/sarah/usb-pm-tool/
104