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.
54*5a2eb858SRafael J. Wysocki
55*5a2eb858SRafael J. WysockiWhat:		/sys/devices/.../power/async
56*5a2eb858SRafael J. WysockiDate:		January 2009
57*5a2eb858SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@sisk.pl>
58*5a2eb858SRafael J. WysockiDescription:
59*5a2eb858SRafael J. Wysocki		The /sys/devices/.../async attribute allows the user space to
60*5a2eb858SRafael J. Wysocki		enable or diasble the device's suspend and resume callbacks to
61*5a2eb858SRafael J. Wysocki		be executed asynchronously (ie. in separate threads, in parallel
62*5a2eb858SRafael J. Wysocki		with the main suspend/resume thread) during system-wide power
63*5a2eb858SRafael J. Wysocki		transitions (eg. suspend to RAM, hibernation).
64*5a2eb858SRafael J. Wysocki
65*5a2eb858SRafael J. Wysocki		All devices have one of the following two values for the
66*5a2eb858SRafael J. Wysocki		power/async file:
67*5a2eb858SRafael J. Wysocki
68*5a2eb858SRafael J. Wysocki		+ "enabled\n" to permit the asynchronous suspend/resume;
69*5a2eb858SRafael J. Wysocki		+ "disabled\n" to forbid it;
70*5a2eb858SRafael J. Wysocki
71*5a2eb858SRafael J. Wysocki		The value of this attribute may be changed by writing either
72*5a2eb858SRafael J. Wysocki		"enabled", or "disabled" to it.
73*5a2eb858SRafael J. Wysocki
74*5a2eb858SRafael J. Wysocki		It generally is unsafe to permit the asynchronous suspend/resume
75*5a2eb858SRafael J. Wysocki		of a device unless it is certain that all of the PM dependencies
76*5a2eb858SRafael J. Wysocki		of the device are known to the PM core.  However, for some
77*5a2eb858SRafael J. Wysocki		devices this attribute is set to "enabled" by bus type code or
78*5a2eb858SRafael J. Wysocki		device drivers and in that cases it should be safe to leave the
79*5a2eb858SRafael J. Wysocki		default value.
80