aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/power/userland-swsusp.txt
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2007-05-09 05:33:18 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-09 15:30:48 -0400
commita3d25c275d383975504dc53c25b691df59bd3c48 (patch)
tree161a2ae12a20a630c2f639e144872db2b92eb098 /Documentation/power/userland-swsusp.txt
parentd60846c4d16f9518b098b905af2b87cb6bf6dc42 (diff)
PM: Separate hibernation code from suspend code
[ With Johannes Berg <johannes@sipsolutions.net> ] Separate the hibernation (aka suspend to disk code) from the other suspend code. In particular: * Remove the definitions related to hibernation from include/linux/pm.h * Introduce struct hibernation_ops and a new hibernate() function to hibernate the system, defined in include/linux/suspend.h * Separate suspend code in kernel/power/main.c from hibernation-related code in kernel/power/disk.c and kernel/power/user.c (with the help of hibernation_ops) * Switch ACPI (the only user of pm_ops.pm_disk_mode) to hibernation_ops Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: Greg KH <greg@kroah.com> Cc: Pavel Machek <pavel@ucw.cz> Cc: Nigel Cunningham <nigel@nigel.suspend2.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/power/userland-swsusp.txt')
-rw-r--r--Documentation/power/userland-swsusp.txt26
1 files changed, 14 insertions, 12 deletions
diff --git a/Documentation/power/userland-swsusp.txt b/Documentation/power/userland-swsusp.txt
index 000556c932e9..e00c6cf09e85 100644
--- a/Documentation/power/userland-swsusp.txt
+++ b/Documentation/power/userland-swsusp.txt
@@ -93,21 +93,23 @@ SNAPSHOT_S2RAM - suspend to RAM; using this call causes the kernel to
93 to resume the system from RAM if there's enough battery power or restore 93 to resume the system from RAM if there's enough battery power or restore
94 its state on the basis of the saved suspend image otherwise) 94 its state on the basis of the saved suspend image otherwise)
95 95
96SNAPSHOT_PMOPS - enable the usage of the pmops->prepare, pmops->enter and 96SNAPSHOT_PMOPS - enable the usage of the hibernation_ops->prepare,
97 pmops->finish methods (the in-kernel swsusp knows these as the "platform 97 hibernate_ops->enter and hibernation_ops->finish methods (the in-kernel
98 method") which are needed on many machines to (among others) speed up 98 swsusp knows these as the "platform method") which are needed on many
99 the resume by letting the BIOS skip some steps or to let the system 99 machines to (among others) speed up the resume by letting the BIOS skip
100 recognise the correct state of the hardware after the resume (in 100 some steps or to let the system recognise the correct state of the
101 particular on many machines this ensures that unplugged AC 101 hardware after the resume (in particular on many machines this ensures
102 adapters get correctly detected and that kacpid does not run wild after 102 that unplugged AC adapters get correctly detected and that kacpid does
103 the resume). The last ioctl() argument can take one of the three 103 not run wild after the resume). The last ioctl() argument can take one
104 values, defined in kernel/power/power.h: 104 of the three values, defined in kernel/power/power.h:
105 PMOPS_PREPARE - make the kernel carry out the 105 PMOPS_PREPARE - make the kernel carry out the
106 pm_ops->prepare(PM_SUSPEND_DISK) operation 106 hibernation_ops->prepare() operation
107 PMOPS_ENTER - make the kernel power off the system by calling 107 PMOPS_ENTER - make the kernel power off the system by calling
108 pm_ops->enter(PM_SUSPEND_DISK) 108 hibernation_ops->enter()
109 PMOPS_FINISH - make the kernel carry out the 109 PMOPS_FINISH - make the kernel carry out the
110 pm_ops->finish(PM_SUSPEND_DISK) operation 110 hibernation_ops->finish() operation
111 Note that the actual constants are misnamed because they surface
112 internal kernel implementation details that have changed.
111 113
112The device's read() operation can be used to transfer the snapshot image from 114The device's read() operation can be used to transfer the snapshot image from
113the kernel. It has the following limitations: 115the kernel. It has the following limitations: