1971cb7fbSRafael J. WysockiWhat:		/sys/devices/.../power/
2971cb7fbSRafael J. WysockiDate:		January 2009
349db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
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
1149db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
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
32cb8f51bdSRafael J. Wysocki		events this file is not present.  In that case the device cannot
33cb8f51bdSRafael J. Wysocki		be enabled to wake up the system from sleep states.
34971cb7fbSRafael J. Wysocki
35971cb7fbSRafael J. WysockiWhat:		/sys/devices/.../power/control
36971cb7fbSRafael J. WysockiDate:		January 2009
3749db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
38971cb7fbSRafael J. WysockiDescription:
39971cb7fbSRafael J. Wysocki		The /sys/devices/.../power/control attribute allows the user
40971cb7fbSRafael J. Wysocki		space to control the run-time power management of the device.
41971cb7fbSRafael J. Wysocki
42971cb7fbSRafael J. Wysocki		All devices have one of the following two values for the
43971cb7fbSRafael J. Wysocki		power/control file:
44971cb7fbSRafael J. Wysocki
45971cb7fbSRafael J. Wysocki		+ "auto\n" to allow the device to be power managed at run time;
46971cb7fbSRafael J. Wysocki		+ "on\n" to prevent the device from being power managed;
47971cb7fbSRafael J. Wysocki
48971cb7fbSRafael J. Wysocki		The default for all devices is "auto", which means that they may
49971cb7fbSRafael J. Wysocki		be subject to automatic power management, depending on their
50971cb7fbSRafael J. Wysocki		drivers.  Changing this attribute to "on" prevents the driver
51971cb7fbSRafael J. Wysocki		from power managing the device at run time.  Doing that while
52971cb7fbSRafael J. Wysocki		the device is suspended causes it to be woken up.
535a2eb858SRafael J. Wysocki
545a2eb858SRafael J. WysockiWhat:		/sys/devices/.../power/async
555a2eb858SRafael J. WysockiDate:		January 2009
5649db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
575a2eb858SRafael J. WysockiDescription:
585a2eb858SRafael J. Wysocki		The /sys/devices/.../async attribute allows the user space to
595a2eb858SRafael J. Wysocki		enable or diasble the device's suspend and resume callbacks to
605a2eb858SRafael J. Wysocki		be executed asynchronously (ie. in separate threads, in parallel
615a2eb858SRafael J. Wysocki		with the main suspend/resume thread) during system-wide power
625a2eb858SRafael J. Wysocki		transitions (eg. suspend to RAM, hibernation).
635a2eb858SRafael J. Wysocki
645a2eb858SRafael J. Wysocki		All devices have one of the following two values for the
655a2eb858SRafael J. Wysocki		power/async file:
665a2eb858SRafael J. Wysocki
675a2eb858SRafael J. Wysocki		+ "enabled\n" to permit the asynchronous suspend/resume;
685a2eb858SRafael J. Wysocki		+ "disabled\n" to forbid it;
695a2eb858SRafael J. Wysocki
705a2eb858SRafael J. Wysocki		The value of this attribute may be changed by writing either
715a2eb858SRafael J. Wysocki		"enabled", or "disabled" to it.
725a2eb858SRafael J. Wysocki
735a2eb858SRafael J. Wysocki		It generally is unsafe to permit the asynchronous suspend/resume
745a2eb858SRafael J. Wysocki		of a device unless it is certain that all of the PM dependencies
755a2eb858SRafael J. Wysocki		of the device are known to the PM core.  However, for some
765a2eb858SRafael J. Wysocki		devices this attribute is set to "enabled" by bus type code or
775a2eb858SRafael J. Wysocki		device drivers and in that cases it should be safe to leave the
785a2eb858SRafael J. Wysocki		default value.
79074037ecSRafael J. Wysocki
80074037ecSRafael J. WysockiWhat:		/sys/devices/.../power/wakeup_count
81074037ecSRafael J. WysockiDate:		September 2010
8249db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
83074037ecSRafael J. WysockiDescription:
84074037ecSRafael J. Wysocki		The /sys/devices/.../wakeup_count attribute contains the number
85074037ecSRafael J. Wysocki		of signaled wakeup events associated with the device.  This
86d0549801SGeert Uytterhoeven		attribute is read-only.  If the device is not capable to wake up
87cb8f51bdSRafael J. Wysocki		the system from sleep states, this attribute is not present.
88d0549801SGeert Uytterhoeven		If the device is not enabled to wake up the system from sleep
89d0549801SGeert Uytterhoeven		states, this attribute is empty.
90074037ecSRafael J. Wysocki
91074037ecSRafael J. WysockiWhat:		/sys/devices/.../power/wakeup_active_count
92074037ecSRafael J. WysockiDate:		September 2010
9349db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
94074037ecSRafael J. WysockiDescription:
95074037ecSRafael J. Wysocki		The /sys/devices/.../wakeup_active_count attribute contains the
96074037ecSRafael J. Wysocki		number of times the processing of wakeup events associated with
97074037ecSRafael J. Wysocki		the device was completed (at the kernel level).  This attribute
98d0549801SGeert Uytterhoeven		is read-only.  If the device is not capable to wake up the
99d0549801SGeert Uytterhoeven		system from sleep states, this attribute is not present.  If
100d0549801SGeert Uytterhoeven		the device is not enabled to wake up the system from sleep
101d0549801SGeert Uytterhoeven		states, this attribute is empty.
102074037ecSRafael J. Wysocki
10330e3ce6dSRafael J. WysockiWhat:		/sys/devices/.../power/wakeup_abort_count
10430e3ce6dSRafael J. WysockiDate:		February 2012
10549db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
106074037ecSRafael J. WysockiDescription:
10730e3ce6dSRafael J. Wysocki		The /sys/devices/.../wakeup_abort_count attribute contains the
108074037ecSRafael J. Wysocki		number of times the processing of a wakeup event associated with
10930e3ce6dSRafael J. Wysocki		the device might have aborted system transition into a sleep
11030e3ce6dSRafael J. Wysocki		state in progress.  This attribute is read-only.  If the device
111d0549801SGeert Uytterhoeven		is not capable to wake up the system from sleep states, this
112d0549801SGeert Uytterhoeven		attribute is not present.  If the device is not enabled to wake
113d0549801SGeert Uytterhoeven		up the system from sleep states, this attribute is empty.
11430e3ce6dSRafael J. Wysocki
11530e3ce6dSRafael J. WysockiWhat:		/sys/devices/.../power/wakeup_expire_count
11630e3ce6dSRafael J. WysockiDate:		February 2012
11749db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
11830e3ce6dSRafael J. WysockiDescription:
11930e3ce6dSRafael J. Wysocki		The /sys/devices/.../wakeup_expire_count attribute contains the
12030e3ce6dSRafael J. Wysocki		number of times a wakeup event associated with the device has
12130e3ce6dSRafael J. Wysocki		been reported with a timeout that expired.  This attribute is
122d0549801SGeert Uytterhoeven		read-only.  If the device is not capable to wake up the system
123d0549801SGeert Uytterhoeven		from sleep states, this attribute is not present.  If the
124d0549801SGeert Uytterhoeven		device is not enabled to wake up the system from sleep states,
125d0549801SGeert Uytterhoeven		this attribute is empty.
126074037ecSRafael J. Wysocki
127074037ecSRafael J. WysockiWhat:		/sys/devices/.../power/wakeup_active
128074037ecSRafael J. WysockiDate:		September 2010
12949db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
130074037ecSRafael J. WysockiDescription:
131074037ecSRafael J. Wysocki		The /sys/devices/.../wakeup_active attribute contains either 1,
132074037ecSRafael J. Wysocki		or 0, depending on whether or not a wakeup event associated with
133074037ecSRafael J. Wysocki		the device is being processed (1).  This attribute is read-only.
134d0549801SGeert Uytterhoeven		If the device is not capable to wake up the system from sleep
135d0549801SGeert Uytterhoeven		states, this attribute is not present.  If the device is not
136d0549801SGeert Uytterhoeven		enabled to wake up the system from sleep states, this attribute
137d0549801SGeert Uytterhoeven		is empty.
138074037ecSRafael J. Wysocki
139074037ecSRafael J. WysockiWhat:		/sys/devices/.../power/wakeup_total_time_ms
140074037ecSRafael J. WysockiDate:		September 2010
14149db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
142074037ecSRafael J. WysockiDescription:
143074037ecSRafael J. Wysocki		The /sys/devices/.../wakeup_total_time_ms attribute contains
144074037ecSRafael J. Wysocki		the total time of processing wakeup events associated with the
145074037ecSRafael J. Wysocki		device, in milliseconds.  This attribute is read-only.  If the
146d0549801SGeert Uytterhoeven		device is not capable to wake up the system from sleep states,
147d0549801SGeert Uytterhoeven		this attribute is not present.  If the device is not enabled to
148d0549801SGeert Uytterhoeven		wake up the system from sleep states, this attribute is empty.
149074037ecSRafael J. Wysocki
150074037ecSRafael J. WysockiWhat:		/sys/devices/.../power/wakeup_max_time_ms
151074037ecSRafael J. WysockiDate:		September 2010
15249db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
153074037ecSRafael J. WysockiDescription:
154074037ecSRafael J. Wysocki		The /sys/devices/.../wakeup_max_time_ms attribute contains
155074037ecSRafael J. Wysocki		the maximum time of processing a single wakeup event associated
156074037ecSRafael J. Wysocki		with the device, in milliseconds.  This attribute is read-only.
157d0549801SGeert Uytterhoeven		If the device is not capable to wake up the system from sleep
158d0549801SGeert Uytterhoeven		states, this attribute is not present.  If the device is not
159d0549801SGeert Uytterhoeven		enabled to wake up the system from sleep states, this attribute
160d0549801SGeert Uytterhoeven		is empty.
161074037ecSRafael J. Wysocki
162074037ecSRafael J. WysockiWhat:		/sys/devices/.../power/wakeup_last_time_ms
163074037ecSRafael J. WysockiDate:		September 2010
16449db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
165074037ecSRafael J. WysockiDescription:
166074037ecSRafael J. Wysocki		The /sys/devices/.../wakeup_last_time_ms attribute contains
167074037ecSRafael J. Wysocki		the value of the monotonic clock corresponding to the time of
168074037ecSRafael J. Wysocki		signaling the last wakeup event associated with the device, in
169074037ecSRafael J. Wysocki		milliseconds.  This attribute is read-only.  If the device is
170074037ecSRafael J. Wysocki		not enabled to wake up the system from sleep states, this
171d0549801SGeert Uytterhoeven		attribute is not present.  If the device is not enabled to wake
172d0549801SGeert Uytterhoeven		up the system from sleep states, this attribute is empty.
17315bcb91dSAlan Stern
17455850945SRafael J. WysockiWhat:		/sys/devices/.../power/wakeup_prevent_sleep_time_ms
17555850945SRafael J. WysockiDate:		February 2012
17649db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
17755850945SRafael J. WysockiDescription:
17855850945SRafael J. Wysocki		The /sys/devices/.../wakeup_prevent_sleep_time_ms attribute
17955850945SRafael J. Wysocki		contains the total time the device has been preventing
1804e79162aSMasanari Iida		opportunistic transitions to sleep states from occurring.
181d0549801SGeert Uytterhoeven		This attribute is read-only.  If the device is not capable to
18255850945SRafael J. Wysocki		wake up the system from sleep states, this attribute is not
183d0549801SGeert Uytterhoeven		present.  If the device is not enabled to wake up the system
184d0549801SGeert Uytterhoeven		from sleep states, this attribute is empty.
18555850945SRafael J. Wysocki
18615bcb91dSAlan SternWhat:		/sys/devices/.../power/autosuspend_delay_ms
18715bcb91dSAlan SternDate:		September 2010
18815bcb91dSAlan SternContact:	Alan Stern <stern@rowland.harvard.edu>
18915bcb91dSAlan SternDescription:
19015bcb91dSAlan Stern		The /sys/devices/.../power/autosuspend_delay_ms attribute
19115bcb91dSAlan Stern		contains the autosuspend delay value (in milliseconds).  Some
19215bcb91dSAlan Stern		drivers do not want their device to suspend as soon as it
19315bcb91dSAlan Stern		becomes idle at run time; they want the device to remain
19415bcb91dSAlan Stern		inactive for a certain minimum period of time first.  That
19515bcb91dSAlan Stern		period is called the autosuspend delay.  Negative values will
19615bcb91dSAlan Stern		prevent the device from being suspended at run time (similar
19715bcb91dSAlan Stern		to writing "on" to the power/control attribute).  Values >=
19815bcb91dSAlan Stern		1000 will cause the autosuspend timer expiration to be rounded
19915bcb91dSAlan Stern		up to the nearest second.
20015bcb91dSAlan Stern
20115bcb91dSAlan Stern		Not all drivers support this attribute.  If it isn't supported,
20215bcb91dSAlan Stern		attempts to read or write it will yield I/O errors.
20385dc0b8aSRafael J. Wysocki
2042d984ad1SRafael J. WysockiWhat:		/sys/devices/.../power/pm_qos_resume_latency_us
20585dc0b8aSRafael J. WysockiDate:		March 2012
20649db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
20785dc0b8aSRafael J. WysockiDescription:
20885dc0b8aSRafael J. Wysocki		The /sys/devices/.../power/pm_qos_resume_latency_us attribute
20985dc0b8aSRafael J. Wysocki		contains the PM QoS resume latency limit for the given device,
21085dc0b8aSRafael J. Wysocki		which is the maximum allowed time it can take to resume the
21185dc0b8aSRafael J. Wysocki		device, after it has been suspended at run time, from a resume
21285dc0b8aSRafael J. Wysocki		request to the moment the device will be ready to process I/O,
21385dc0b8aSRafael J. Wysocki		in microseconds.  If it is equal to 0, however, this means that
2140759e80bSRafael J. Wysocki		the PM QoS resume latency may be arbitrary and the special value
2150759e80bSRafael J. Wysocki		"n/a" means that user space cannot accept any resume latency at
2160759e80bSRafael J. Wysocki		all for the given device.
21785dc0b8aSRafael J. Wysocki
21885dc0b8aSRafael J. Wysocki		Not all drivers support this attribute.  If it isn't supported,
21985dc0b8aSRafael J. Wysocki		it is not present.
22085dc0b8aSRafael J. Wysocki
22185dc0b8aSRafael J. Wysocki		This attribute has no effect on system-wide suspend/resume and
22285dc0b8aSRafael J. Wysocki		hibernation.
223e39473d0SRafael J. Wysocki
2242d984ad1SRafael J. WysockiWhat:		/sys/devices/.../power/pm_qos_latency_tolerance_us
2252d984ad1SRafael J. WysockiDate:		January 2014
2262d984ad1SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
2272d984ad1SRafael J. WysockiDescription:
2282d984ad1SRafael J. Wysocki		The /sys/devices/.../power/pm_qos_latency_tolerance_us attribute
2292d984ad1SRafael J. Wysocki		contains the PM QoS active state latency tolerance limit for the
2302d984ad1SRafael J. Wysocki		given device in microseconds.  That is the maximum memory access
2312d984ad1SRafael J. Wysocki		latency the device can suffer without any visible adverse
2322d984ad1SRafael J. Wysocki		effects on user space functionality.  If that value is the
2332d984ad1SRafael J. Wysocki		string "any", the latency does not matter to user space at all,
2342d984ad1SRafael J. Wysocki		but hardware should not be allowed to set the latency tolerance
2352d984ad1SRafael J. Wysocki		for the device automatically.
2362d984ad1SRafael J. Wysocki
2372d984ad1SRafael J. Wysocki		Reading "auto" from this file means that the maximum memory
2382d984ad1SRafael J. Wysocki		access latency for the device may be determined automatically
2392d984ad1SRafael J. Wysocki		by the hardware as needed.  Writing "auto" to it allows the
2402d984ad1SRafael J. Wysocki		hardware to be switched to this mode if there are no other
2412d984ad1SRafael J. Wysocki		latency tolerance requirements from the kernel side.
2422d984ad1SRafael J. Wysocki
2432d984ad1SRafael J. Wysocki		This attribute is only present if the feature controlled by it
2442d984ad1SRafael J. Wysocki		is supported by the hardware.
2452d984ad1SRafael J. Wysocki
2462d984ad1SRafael J. Wysocki		This attribute has no effect on runtime suspend and resume of
2472d984ad1SRafael J. Wysocki		devices and on system-wide suspend/resume and hibernation.
2482d984ad1SRafael J. Wysocki
249e39473d0SRafael J. WysockiWhat:		/sys/devices/.../power/pm_qos_no_power_off
250e39473d0SRafael J. WysockiDate:		September 2012
25149db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
252e39473d0SRafael J. WysockiDescription:
253e39473d0SRafael J. Wysocki		The /sys/devices/.../power/pm_qos_no_power_off attribute
254e39473d0SRafael J. Wysocki		is used for manipulating the PM QoS "no power off" flag.  If
255e39473d0SRafael J. Wysocki		set, this flag indicates to the kernel that power should not
256e39473d0SRafael J. Wysocki		be removed entirely from the device.
257e39473d0SRafael J. Wysocki
258e39473d0SRafael J. Wysocki		Not all drivers support this attribute.  If it isn't supported,
259e39473d0SRafael J. Wysocki		it is not present.
260e39473d0SRafael J. Wysocki
261e39473d0SRafael J. Wysocki		This attribute has no effect on system-wide suspend/resume and
262e39473d0SRafael J. Wysocki		hibernation.
263