linux-stable/Documentation/power
Brian Norris 1d4a9c17d4 PM / sleep: add configurable delay for pm_test
When CONFIG_PM_DEBUG=y, we provide a sysfs file (/sys/power/pm_test) for
selecting one of a few suspend test modes, where rather than entering a
full suspend state, the kernel will perform some subset of suspend
steps, wait 5 seconds, and then resume back to normal operation.

This mode is useful for (among other things) observing the state of the
system just before entering a sleep mode, for debugging or analysis
purposes. However, a constant 5 second wait is not sufficient for some
sorts of analysis; for example, on an SoC, one might want to use
external tools to probe the power states of various on-chip controllers
or clocks.

This patch turns this 5 second delay into a configurable module
parameter, so users can determine how long to wait in this
pseudo-suspend state before resuming the system.

Example (wait 30 seconds);

  # echo 30 > /sys/module/suspend/parameters/pm_test_delay
  # echo core > /sys/power/pm_test
  # time echo mem  > /sys/power/state
  ...
  [   17.583625] suspend debug: Waiting for 30 second(s).
  ...
  real	0m30.381s
  user	0m0.017s
  sys	0m0.080s

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Reviewed-by: Kevin Cernekee <cernekee@chromium.org>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-02-26 01:21:26 +01:00
..
powercap PowerCap: Documentation 2013-10-17 00:36:06 +02:00
regulator regulator: Proofread documentation 2014-08-27 22:04:36 +01:00
00-INDEX Documentation/: update 00-INDEX files 2014-02-10 16:01:40 -08:00
apm-acpi.txt
basic-pm-debugging.txt PM / sleep: add configurable delay for pm_test 2015-02-26 01:21:26 +01:00
charger-manager.txt Documentation: Charger Manager: Fix spelling mistakes 2014-09-16 11:01:27 +02:00
devices.txt PM / sleep: Update device PM documentation to cover direct_complete 2014-05-16 23:15:44 +02:00
drivers-testing.txt PM: Fix references to basic-pm-debugging.txt in drivers-testing.txt 2010-12-24 15:02:41 +01:00
freezing-of-tasks.txt suspend: enable freeze timeout configuration through sys 2013-02-09 22:32:48 +01:00
interface.txt PM: Documentation update for freeze state 2013-05-14 01:41:37 +02:00
notifiers.txt PM / hibernate: Correct documentation 2013-05-14 01:58:43 +02:00
opp.txt PM / OPP: Remove ARCH_HAS_OPP 2014-07-23 00:51:30 +02:00
pci.txt
pm_qos_interface.txt PM / QoS: Add PM_QOS_MEMORY_BANDWIDTH class 2014-09-25 01:18:33 +02:00
power_supply_class.txt power_supply: Add boot and calibration attributes 2014-09-06 21:05:04 +02:00
runtime_pm.txt Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2014-12-12 15:26:48 -08:00
s2ram.txt PM / sleep: Mention async suspend in PM_TRACE documentation 2015-01-30 01:29:46 +01:00
states.txt PM / sleep: Introduce command line argument for sleep state enumeration 2014-05-26 13:40:59 +02:00
suspend-and-cpuhotplug.txt PM / Documentation: Update copyright in suspend-and-cpuhotplug.txt 2014-06-09 22:54:15 +02:00
suspend-and-interrupts.txt Documentation: power: Fix typo in Documentation/power 2014-11-08 09:15:14 -05:00
swsusp-and-swap-files.txt
swsusp-dmcrypt.txt
swsusp.txt PM / hibernate: Documentation: Fix script for unswapping 2014-05-07 01:51:16 +02:00
tricks.txt
userland-swsusp.txt Documentation: power: Fix typo in Documentation/power 2014-11-08 09:15:14 -05:00
video.txt