-
Patrick Mochel authored
Suspend-to-disk can be handled in numerous ways, some we have control over, and others we don't. The biggest difference is whether or not the firmware is responsible for entering a low-power state or if the platform driver is. The two modes are incompatible, so we enable the platform driver tell the PM core when they register their pm_ops (via the ->pm_disk_mode) field. If the firmware is responsible, then it will also write memory to disk, while the kernel is otherwise responsible. However, a user may choose to use the in-kernel suspend mechanism, even if the system supports only the firmware mechanism. Instead of entering a low-power state, the system will turn off (or reboot for testing). A sysfs file -- /sys/power/disk -- is available to set the mode to one of: 'firmware' 'platform' 'shutdown' 'reboot' The latter two are settable any time, and assume that one is using swsusp. The other two are only settable to what the platform supports.
4db33583