1971cb7fbSRafael J. WysockiWhat:		/sys/devices/.../power/
2971cb7fbSRafael J. WysockiDate:		January 2009
3971cb7fbSRafael J. WysockiContact:	Rafael J. Wysocki <rjw@sisk.pl>
4971cb7fbSRafael J. WysockiDescription:
5971cb7fbSRafael J. Wysocki		The /sys/devices/.../power directory contains attributes
6971cb7fbSRafael J. Wysocki		allowing the user space to check and modify some power
7971cb7fbSRafael J. Wysocki		management related properties of given device.
8971cb7fbSRafael J. Wysocki
9971cb7fbSRafael J. WysockiWhat:		/sys/devices/.../power/wakeup
10971cb7fbSRafael J. WysockiDate:		January 2009
11971cb7fbSRafael J. WysockiContact:	Rafael J. Wysocki <rjw@sisk.pl>
12971cb7fbSRafael J. WysockiDescription:
13971cb7fbSRafael J. Wysocki		The /sys/devices/.../power/wakeup attribute allows the user
14971cb7fbSRafael J. Wysocki		space to check if the device is enabled to wake up the system
15971cb7fbSRafael J. Wysocki		from sleep states, such as the memory sleep state (suspend to
16971cb7fbSRafael J. Wysocki		RAM) and hibernation (suspend to disk), and to enable or disable
17971cb7fbSRafael J. Wysocki		it to do that as desired.
18971cb7fbSRafael J. Wysocki
19971cb7fbSRafael J. Wysocki		Some devices support "wakeup" events, which are hardware signals
20971cb7fbSRafael J. Wysocki		used to activate the system from a sleep state.  Such devices
21971cb7fbSRafael J. Wysocki		have one of the following two values for the sysfs power/wakeup
22971cb7fbSRafael J. Wysocki		file:
23971cb7fbSRafael J. Wysocki
24971cb7fbSRafael J. Wysocki		+ "enabled\n" to issue the events;
25971cb7fbSRafael J. Wysocki		+ "disabled\n" not to do so;
26971cb7fbSRafael J. Wysocki
27971cb7fbSRafael J. Wysocki		In that cases the user space can change the setting represented
28971cb7fbSRafael J. Wysocki		by the contents of this file by writing either "enabled", or
29971cb7fbSRafael J. Wysocki		"disabled" to it.
30971cb7fbSRafael J. Wysocki
31971cb7fbSRafael J. Wysocki		For the devices that are not capable of generating system wakeup
32971cb7fbSRafael J. Wysocki		events this file contains "\n".  In that cases the user space
33971cb7fbSRafael J. Wysocki		cannot modify the contents of this file and the device cannot be
34971cb7fbSRafael J. Wysocki		enabled to wake up the system.
35971cb7fbSRafael J. Wysocki
36971cb7fbSRafael J. WysockiWhat:		/sys/devices/.../power/control
37971cb7fbSRafael J. WysockiDate:		January 2009
38971cb7fbSRafael J. WysockiContact:	Rafael J. Wysocki <rjw@sisk.pl>
39971cb7fbSRafael J. WysockiDescription:
40971cb7fbSRafael J. Wysocki		The /sys/devices/.../power/control attribute allows the user
41971cb7fbSRafael J. Wysocki		space to control the run-time power management of the device.
42971cb7fbSRafael J. Wysocki
43971cb7fbSRafael J. Wysocki		All devices have one of the following two values for the
44971cb7fbSRafael J. Wysocki		power/control file:
45971cb7fbSRafael J. Wysocki
46971cb7fbSRafael J. Wysocki		+ "auto\n" to allow the device to be power managed at run time;
47971cb7fbSRafael J. Wysocki		+ "on\n" to prevent the device from being power managed;
48971cb7fbSRafael J. Wysocki
49971cb7fbSRafael J. Wysocki		The default for all devices is "auto", which means that they may
50971cb7fbSRafael J. Wysocki		be subject to automatic power management, depending on their
51971cb7fbSRafael J. Wysocki		drivers.  Changing this attribute to "on" prevents the driver
52971cb7fbSRafael J. Wysocki		from power managing the device at run time.  Doing that while
53971cb7fbSRafael J. Wysocki		the device is suspended causes it to be woken up.
545a2eb858SRafael J. Wysocki
555a2eb858SRafael J. WysockiWhat:		/sys/devices/.../power/async
565a2eb858SRafael J. WysockiDate:		January 2009
575a2eb858SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@sisk.pl>
585a2eb858SRafael J. WysockiDescription:
595a2eb858SRafael J. Wysocki		The /sys/devices/.../async attribute allows the user space to
605a2eb858SRafael J. Wysocki		enable or diasble the device's suspend and resume callbacks to
615a2eb858SRafael J. Wysocki		be executed asynchronously (ie. in separate threads, in parallel
625a2eb858SRafael J. Wysocki		with the main suspend/resume thread) during system-wide power
635a2eb858SRafael J. Wysocki		transitions (eg. suspend to RAM, hibernation).
645a2eb858SRafael J. Wysocki
655a2eb858SRafael J. Wysocki		All devices have one of the following two values for the
665a2eb858SRafael J. Wysocki		power/async file:
675a2eb858SRafael J. Wysocki
685a2eb858SRafael J. Wysocki		+ "enabled\n" to permit the asynchronous suspend/resume;
695a2eb858SRafael J. Wysocki		+ "disabled\n" to forbid it;
705a2eb858SRafael J. Wysocki
715a2eb858SRafael J. Wysocki		The value of this attribute may be changed by writing either
725a2eb858SRafael J. Wysocki		"enabled", or "disabled" to it.
735a2eb858SRafael J. Wysocki
745a2eb858SRafael J. Wysocki		It generally is unsafe to permit the asynchronous suspend/resume
755a2eb858SRafael J. Wysocki		of a device unless it is certain that all of the PM dependencies
765a2eb858SRafael J. Wysocki		of the device are known to the PM core.  However, for some
775a2eb858SRafael J. Wysocki		devices this attribute is set to "enabled" by bus type code or
785a2eb858SRafael J. Wysocki		device drivers and in that cases it should be safe to leave the
795a2eb858SRafael J. Wysocki		default value.
80074037ecSRafael J. Wysocki
81074037ecSRafael J. WysockiWhat:		/sys/devices/.../power/wakeup_count
82074037ecSRafael J. WysockiDate:		September 2010
83074037ecSRafael J. WysockiContact:	Rafael J. Wysocki <rjw@sisk.pl>
84074037ecSRafael J. WysockiDescription:
85074037ecSRafael J. Wysocki		The /sys/devices/.../wakeup_count attribute contains the number
86074037ecSRafael J. Wysocki		of signaled wakeup events associated with the device.  This
87074037ecSRafael J. Wysocki		attribute is read-only.  If the device is not enabled to wake up
88074037ecSRafael J. Wysocki		the system from sleep states, this attribute is empty.
89074037ecSRafael J. Wysocki
90074037ecSRafael J. WysockiWhat:		/sys/devices/.../power/wakeup_active_count
91074037ecSRafael J. WysockiDate:		September 2010
92074037ecSRafael J. WysockiContact:	Rafael J. Wysocki <rjw@sisk.pl>
93074037ecSRafael J. WysockiDescription:
94074037ecSRafael J. Wysocki		The /sys/devices/.../wakeup_active_count attribute contains the
95074037ecSRafael J. Wysocki		number of times the processing of wakeup events associated with
96074037ecSRafael J. Wysocki		the device was completed (at the kernel level).  This attribute
97074037ecSRafael J. Wysocki		is read-only.  If the device is not enabled to wake up the
98074037ecSRafael J. Wysocki		system from sleep states, this attribute is empty.
99074037ecSRafael J. Wysocki
100074037ecSRafael J. WysockiWhat:		/sys/devices/.../power/wakeup_hit_count
101074037ecSRafael J. WysockiDate:		September 2010
102074037ecSRafael J. WysockiContact:	Rafael J. Wysocki <rjw@sisk.pl>
103074037ecSRafael J. WysockiDescription:
104074037ecSRafael J. Wysocki		The /sys/devices/.../wakeup_hit_count attribute contains the
105074037ecSRafael J. Wysocki		number of times the processing of a wakeup event associated with
106074037ecSRafael J. Wysocki		the device might prevent the system from entering a sleep state.
107074037ecSRafael J. Wysocki		This attribute is read-only.  If the device is not enabled to
108074037ecSRafael J. Wysocki		wake up the system from sleep states, this attribute is empty.
109074037ecSRafael J. Wysocki
110074037ecSRafael J. WysockiWhat:		/sys/devices/.../power/wakeup_active
111074037ecSRafael J. WysockiDate:		September 2010
112074037ecSRafael J. WysockiContact:	Rafael J. Wysocki <rjw@sisk.pl>
113074037ecSRafael J. WysockiDescription:
114074037ecSRafael J. Wysocki		The /sys/devices/.../wakeup_active attribute contains either 1,
115074037ecSRafael J. Wysocki		or 0, depending on whether or not a wakeup event associated with
116074037ecSRafael J. Wysocki		the device is being processed (1).  This attribute is read-only.
117074037ecSRafael J. Wysocki		If the device is not enabled to wake up the system from sleep
118074037ecSRafael J. Wysocki		states, this attribute is empty.
119074037ecSRafael J. Wysocki
120074037ecSRafael J. WysockiWhat:		/sys/devices/.../power/wakeup_total_time_ms
121074037ecSRafael J. WysockiDate:		September 2010
122074037ecSRafael J. WysockiContact:	Rafael J. Wysocki <rjw@sisk.pl>
123074037ecSRafael J. WysockiDescription:
124074037ecSRafael J. Wysocki		The /sys/devices/.../wakeup_total_time_ms attribute contains
125074037ecSRafael J. Wysocki		the total time of processing wakeup events associated with the
126074037ecSRafael J. Wysocki		device, in milliseconds.  This attribute is read-only.  If the
127074037ecSRafael J. Wysocki		device is not enabled to wake up the system from sleep states,
128074037ecSRafael J. Wysocki		this attribute is empty.
129074037ecSRafael J. Wysocki
130074037ecSRafael J. WysockiWhat:		/sys/devices/.../power/wakeup_max_time_ms
131074037ecSRafael J. WysockiDate:		September 2010
132074037ecSRafael J. WysockiContact:	Rafael J. Wysocki <rjw@sisk.pl>
133074037ecSRafael J. WysockiDescription:
134074037ecSRafael J. Wysocki		The /sys/devices/.../wakeup_max_time_ms attribute contains
135074037ecSRafael J. Wysocki		the maximum time of processing a single wakeup event associated
136074037ecSRafael J. Wysocki		with the device, in milliseconds.  This attribute is read-only.
137074037ecSRafael J. Wysocki		If the device is not enabled to wake up the system from sleep
138074037ecSRafael J. Wysocki		states, this attribute is empty.
139074037ecSRafael J. Wysocki
140074037ecSRafael J. WysockiWhat:		/sys/devices/.../power/wakeup_last_time_ms
141074037ecSRafael J. WysockiDate:		September 2010
142074037ecSRafael J. WysockiContact:	Rafael J. Wysocki <rjw@sisk.pl>
143074037ecSRafael J. WysockiDescription:
144074037ecSRafael J. Wysocki		The /sys/devices/.../wakeup_last_time_ms attribute contains
145074037ecSRafael J. Wysocki		the value of the monotonic clock corresponding to the time of
146074037ecSRafael J. Wysocki		signaling the last wakeup event associated with the device, in
147074037ecSRafael J. Wysocki		milliseconds.  This attribute is read-only.  If the device is
148074037ecSRafael J. Wysocki		not enabled to wake up the system from sleep states, this
149074037ecSRafael J. Wysocki		attribute is empty.
15015bcb91dSAlan Stern
15115bcb91dSAlan SternWhat:		/sys/devices/.../power/autosuspend_delay_ms
15215bcb91dSAlan SternDate:		September 2010
15315bcb91dSAlan SternContact:	Alan Stern <stern@rowland.harvard.edu>
15415bcb91dSAlan SternDescription:
15515bcb91dSAlan Stern		The /sys/devices/.../power/autosuspend_delay_ms attribute
15615bcb91dSAlan Stern		contains the autosuspend delay value (in milliseconds).  Some
15715bcb91dSAlan Stern		drivers do not want their device to suspend as soon as it
15815bcb91dSAlan Stern		becomes idle at run time; they want the device to remain
15915bcb91dSAlan Stern		inactive for a certain minimum period of time first.  That
16015bcb91dSAlan Stern		period is called the autosuspend delay.  Negative values will
16115bcb91dSAlan Stern		prevent the device from being suspended at run time (similar
16215bcb91dSAlan Stern		to writing "on" to the power/control attribute).  Values >=
16315bcb91dSAlan Stern		1000 will cause the autosuspend timer expiration to be rounded
16415bcb91dSAlan Stern		up to the nearest second.
16515bcb91dSAlan Stern
16615bcb91dSAlan Stern		Not all drivers support this attribute.  If it isn't supported,
16715bcb91dSAlan Stern		attempts to read or write it will yield I/O errors.
168