aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2007-10-25 19:01:10 -0400
committerLen Brown <len.brown@intel.com>2008-02-01 18:30:53 -0500
commiteb57c1cf059630454b40fb8bb124e3f318d241f8 (patch)
treedf8abba4265647f15b3b30053a4d843099bb6b9e /Documentation
parentaf508b34d27e3341287d89e0eae6752fdb1b873f (diff)
Hibernation: Rework platform support ioctls (rev. 2)
Modify the hibernation userland interface by adding two new ioctls to it, SNAPSHOT_PLATFORM_SUPPORT and SNAPSHOT_POWER_OFF, that can be used, respectively, to switch the hibernation platform support on/off and to make the kernel transition the system to the hibernation state (eg. ACPI S4) using the platform (eg. ACPI) driver. These ioctls are intended to replace the misdesigned SNAPSHOT_PMOPS ioctl, which from now is regarded as obsolete and will be removed in the future. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/power/userland-swsusp.txt24
1 files changed, 6 insertions, 18 deletions
diff --git a/Documentation/power/userland-swsusp.txt b/Documentation/power/userland-swsusp.txt
index 32f187479697..381e9c0fb9d6 100644
--- a/Documentation/power/userland-swsusp.txt
+++ b/Documentation/power/userland-swsusp.txt
@@ -85,6 +85,12 @@ SNAPSHOT_SET_SWAP_AREA - set the resume partition and the offset (in <PAGE_SIZE>
85 recommended to always use this call, because the code to set the resume 85 recommended to always use this call, because the code to set the resume
86 partition may be removed from future kernels 86 partition may be removed from future kernels
87 87
88SNAPSHOT_PLATFORM_SUPPORT - enable/disable the hibernation platform support,
89 depending on the argument value (enable, if the argument is nonzero)
90
91SNAPSHOT_POWER_OFF - make the kernel transition the system to the hibernation
92 state (eg. ACPI S4) using the platform (eg. ACPI) driver
93
88SNAPSHOT_S2RAM - suspend to RAM; using this call causes the kernel to 94SNAPSHOT_S2RAM - suspend to RAM; using this call causes the kernel to
89 immediately enter the suspend-to-RAM state, so this call must always 95 immediately enter the suspend-to-RAM state, so this call must always
90 be preceded by the SNAPSHOT_FREEZE call and it is also necessary 96 be preceded by the SNAPSHOT_FREEZE call and it is also necessary
@@ -95,24 +101,6 @@ SNAPSHOT_S2RAM - suspend to RAM; using this call causes the kernel to
95 to resume the system from RAM if there's enough battery power or restore 101 to resume the system from RAM if there's enough battery power or restore
96 its state on the basis of the saved suspend image otherwise) 102 its state on the basis of the saved suspend image otherwise)
97 103
98SNAPSHOT_PMOPS - enable the usage of the hibernation_ops->prepare,
99 hibernate_ops->enter and hibernation_ops->finish methods (the in-kernel
100 swsusp knows these as the "platform method") which are needed on many
101 machines to (among others) speed up the resume by letting the BIOS skip
102 some steps or to let the system recognise the correct state of the
103 hardware after the resume (in particular on many machines this ensures
104 that unplugged AC adapters get correctly detected and that kacpid does
105 not run wild after the resume). The last ioctl() argument can take one
106 of the three values, defined in kernel/power/power.h:
107 PMOPS_PREPARE - make the kernel carry out the
108 hibernation_ops->prepare() operation
109 PMOPS_ENTER - make the kernel power off the system by calling
110 hibernation_ops->enter()
111 PMOPS_FINISH - make the kernel carry out the
112 hibernation_ops->finish() operation
113 Note that the actual constants are misnamed because they surface
114 internal kernel implementation details that have changed.
115
116The device's read() operation can be used to transfer the snapshot image from 104The device's read() operation can be used to transfer the snapshot image from
117the kernel. It has the following limitations: 105the kernel. It has the following limitations:
118- you cannot read() more than one virtual memory page at a time 106- you cannot read() more than one virtual memory page at a time