ssize_t disk_show (struct subsystem * subsys, char * buf);
Suspend-to-disk can be handled in several ways. The greatest distinction is who writes memory to disk - the firmware or the OS. If the firmware does it, we assume that it also handles suspending the system. If the OS does it, then we have three options for putting the system to sleep - using the platform driver (e.g. ACPI or other PM registers), powering off the system or rebooting the system (for testing).
The system will support either 'firmware' or 'platform', and that is known a priori (and encoded in pm_ops). But, the user may choose
show will display what the mode is currently set to. store will accept one of
It will only change to 'firmware' or 'platform' if the system supports it (as determined from pm_ops->pm_disk_mode).