]> git.baikalelectronics.ru Git - kernel.git/commit
PM / sleep: Introduce command line argument for sleep state enumeration
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 26 May 2014 11:40:59 +0000 (13:40 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 26 May 2014 11:40:59 +0000 (13:40 +0200)
commit56bd68aa28c57ce2bf08bce9bc81952022e14b27
tree3948336693fa6a945cd54787b205cbcbcd8afa5d
parent696432b59e9f9e033e017362df2948f962845a62
PM / sleep: Introduce command line argument for sleep state enumeration

On some systems the platform doesn't support neither
PM_SUSPEND_MEM nor PM_SUSPEND_STANDBY, so PM_SUSPEND_FREEZE is the
only available system sleep state.  However, some user space frameworks
only use the "mem" and (sometimes) "standby" sleep state labels, so
the users of those systems need to modify user space in order to be
able to use system suspend at all and that is not always possible.

For this reason, add a new kernel command line argument,
relative_sleep_states, allowing the users of those systems to change
the way in which the kernel assigns labels to system sleep states.
Namely, for relative_sleep_states=1, the "mem", "standby" and "freeze"
labels will enumerate the available system sleem states from the
deepest to the shallowest, respectively, so that "mem" is always
present in /sys/power/state and the other state strings may or may
not be presend depending on what is supported by the platform.

Update system sleep states documentation to reflect this change.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Documentation/ABI/testing/sysfs-power
Documentation/kernel-parameters.txt
Documentation/power/states.txt
kernel/power/main.c
kernel/power/suspend.c