xref: /linux/kernel/power/Kconfig (revision 1eb208aea3179dd2fc0cdeea45ef869d75b4fe70)
11da177e4SLinus Torvaldsconfig PM
2*1eb208aeSRafael J. Wysocki	bool
3*1eb208aeSRafael J. Wysocki	depends on PM_SLEEP || PM_RUNTIME
4*1eb208aeSRafael J. Wysocki	default y
51da177e4SLinus Torvalds
61da177e4SLinus Torvaldsconfig PM_DEBUG
71da177e4SLinus Torvalds	bool "Power Management Debug Support"
81da177e4SLinus Torvalds	depends on PM
91da177e4SLinus Torvalds	---help---
10a0349828SBen Collins	This option enables various debugging support in the Power Management
11a0349828SBen Collins	code. This is helpful when debugging and reporting PM bugs, like
12a0349828SBen Collins	suspend support.
13a0349828SBen Collins
145a2eb858SRafael J. Wysockiconfig PM_ADVANCED_DEBUG
155a2eb858SRafael J. Wysocki	bool "Extra PM attributes in sysfs for low-level debugging/testing"
165a2eb858SRafael J. Wysocki	depends on PM_DEBUG
175a2eb858SRafael J. Wysocki	default n
185a2eb858SRafael J. Wysocki	---help---
195a2eb858SRafael J. Wysocki	Add extra sysfs attributes allowing one to access some Power Management
205a2eb858SRafael J. Wysocki	fields of device objects from user space.  If you are not a kernel
215a2eb858SRafael J. Wysocki	developer interested in debugging/testing Power Management, say "no".
225a2eb858SRafael J. Wysocki
23a0349828SBen Collinsconfig PM_VERBOSE
24a0349828SBen Collins	bool "Verbose Power Management debugging"
25a0349828SBen Collins	depends on PM_DEBUG
26a0349828SBen Collins	default n
27a0349828SBen Collins	---help---
28a0349828SBen Collins	This option enables verbose messages from the Power Management code.
291da177e4SLinus Torvalds
3090dda1cbSJohannes Bergconfig CAN_PM_TRACE
3190dda1cbSJohannes Berg	def_bool y
3290dda1cbSJohannes Berg	depends on PM_DEBUG && PM_SLEEP && EXPERIMENTAL
3390dda1cbSJohannes Berg
34eb71c87aSLinus Torvaldsconfig PM_TRACE
3590dda1cbSJohannes Berg	bool
3690dda1cbSJohannes Berg	help
3790dda1cbSJohannes Berg	  This enables code to save the last PM event point across
3890dda1cbSJohannes Berg	  reboot. The architecture needs to support this, x86 for
3990dda1cbSJohannes Berg	  example does by saving things in the RTC, see below.
4090dda1cbSJohannes Berg
4190dda1cbSJohannes Berg	  The architecture specific code must provide the extern
4290dda1cbSJohannes Berg	  functions from <linux/resume-trace.h> as well as the
4390dda1cbSJohannes Berg	  <asm/resume-trace.h> header with a TRACE_RESUME() macro.
4490dda1cbSJohannes Berg
4590dda1cbSJohannes Berg	  The way the information is presented is architecture-
4690dda1cbSJohannes Berg	  dependent, x86 will print the information during a
4790dda1cbSJohannes Berg	  late_initcall.
4890dda1cbSJohannes Berg
4990dda1cbSJohannes Bergconfig PM_TRACE_RTC
50eb71c87aSLinus Torvalds	bool "Suspend/resume event tracing"
5190dda1cbSJohannes Berg	depends on CAN_PM_TRACE
5290dda1cbSJohannes Berg	depends on X86
5390dda1cbSJohannes Berg	select PM_TRACE
545c31f273SAndrew Morton	default n
55eb71c87aSLinus Torvalds	---help---
56eb71c87aSLinus Torvalds	This enables some cheesy code to save the last PM event point in the
57eb71c87aSLinus Torvalds	RTC across reboots, so that you can debug a machine that just hangs
58eb71c87aSLinus Torvalds	during suspend (or more commonly, during resume).
59eb71c87aSLinus Torvalds
6023b168d4SPavel Machek	To use this debugging feature you should attempt to suspend the
6123b168d4SPavel Machek	machine, reboot it and then run
625c31f273SAndrew Morton
635c31f273SAndrew Morton		dmesg -s 1000000 | grep 'hash matches'
645c31f273SAndrew Morton
655c31f273SAndrew Morton	CAUTION: this option will cause your machine's real-time clock to be
665c31f273SAndrew Morton	set to an invalid time after a resume.
675c31f273SAndrew Morton
68f3de4be9SRafael J. Wysockiconfig PM_SLEEP_SMP
69296699deSRafael J. Wysocki	bool
70801e4062SJohannes Berg	depends on SMP
71f4cb5700SJohannes Berg	depends on ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE
72f3de4be9SRafael J. Wysocki	depends on PM_SLEEP
73ede890c2SRafael J. Wysocki	select HOTPLUG
74296699deSRafael J. Wysocki	select HOTPLUG_CPU
75296699deSRafael J. Wysocki	default y
76296699deSRafael J. Wysocki
77296699deSRafael J. Wysockiconfig PM_SLEEP
78296699deSRafael J. Wysocki	bool
7993a0886eSJeremy Fitzhardinge	depends on SUSPEND || HIBERNATION || XEN_SAVE_RESTORE
80296699deSRafael J. Wysocki	default y
81296699deSRafael J. Wysocki
825a2eb858SRafael J. Wysockiconfig PM_SLEEP_ADVANCED_DEBUG
835a2eb858SRafael J. Wysocki	bool
845a2eb858SRafael J. Wysocki	depends on PM_ADVANCED_DEBUG
855a2eb858SRafael J. Wysocki	default n
865a2eb858SRafael J. Wysocki
87296699deSRafael J. Wysockiconfig SUSPEND
88296699deSRafael J. Wysocki	bool "Suspend to RAM and standby"
89*1eb208aeSRafael J. Wysocki	depends on ARCH_SUSPEND_POSSIBLE
90296699deSRafael J. Wysocki	default y
91296699deSRafael J. Wysocki	---help---
92296699deSRafael J. Wysocki	  Allow the system to enter sleep states in which main memory is
93296699deSRafael J. Wysocki	  powered and thus its contents are preserved, such as the
94f4cb5700SJohannes Berg	  suspend-to-RAM state (e.g. the ACPI S3 state).
95296699deSRafael J. Wysocki
9677437fd4SDavid Brownellconfig PM_TEST_SUSPEND
9777437fd4SDavid Brownell	bool "Test suspend/resume and wakealarm during bootup"
9828959742SAl Viro	depends on SUSPEND && PM_DEBUG && RTC_CLASS=y
9977437fd4SDavid Brownell	---help---
10077437fd4SDavid Brownell	This option will let you suspend your machine during bootup, and
10177437fd4SDavid Brownell	make it wake up a few seconds later using an RTC wakeup alarm.
10277437fd4SDavid Brownell	Enable this with a kernel parameter like "test_suspend=mem".
10377437fd4SDavid Brownell
10477437fd4SDavid Brownell	You probably want to have your system's RTC driver statically
10577437fd4SDavid Brownell	linked, ensuring that it's available when this test runs.
10677437fd4SDavid Brownell
107b28f5081SJohannes Bergconfig SUSPEND_FREEZER
108b28f5081SJohannes Berg	bool "Enable freezer for suspend to RAM/standby" \
109b28f5081SJohannes Berg		if ARCH_WANTS_FREEZER_CONTROL || BROKEN
110b28f5081SJohannes Berg	depends on SUSPEND
111b28f5081SJohannes Berg	default y
112b28f5081SJohannes Berg	help
113b28f5081SJohannes Berg	  This allows you to turn off the freezer for suspend. If this is
114b28f5081SJohannes Berg	  done, no tasks are frozen for suspend to RAM/standby.
115b28f5081SJohannes Berg
116b28f5081SJohannes Berg	  Turning OFF this setting is NOT recommended! If in doubt, say Y.
117b28f5081SJohannes Berg
118b0cb1a19SRafael J. Wysockiconfig HIBERNATION
119296699deSRafael J. Wysocki	bool "Hibernation (aka 'suspend to disk')"
120*1eb208aeSRafael J. Wysocki	depends on SWAP && ARCH_HIBERNATION_POSSIBLE
121f996fc96SBojan Smojver	select LZO_COMPRESS
122f996fc96SBojan Smojver	select LZO_DECOMPRESS
1231da177e4SLinus Torvalds	---help---
124a7ee2e5fSDavid Brownell	  Enable the suspend to disk (STD) functionality, which is usually
125a7ee2e5fSDavid Brownell	  called "hibernation" in user interfaces.  STD checkpoints the
126a7ee2e5fSDavid Brownell	  system and powers it off; and restores that checkpoint on reboot.
1271da177e4SLinus Torvalds
12823b168d4SPavel Machek	  You can suspend your machine with 'echo disk > /sys/power/state'
12923b168d4SPavel Machek	  after placing resume=/dev/swappartition on the kernel command line
13023b168d4SPavel Machek	  in your bootloader's configuration file.
13123b168d4SPavel Machek
132c7276fdeSRafael J. Wysocki	  Alternatively, you can use the additional userland tools available
133c7276fdeSRafael J. Wysocki	  from <http://suspend.sf.net>.
134c7276fdeSRafael J. Wysocki
135c7276fdeSRafael J. Wysocki	  In principle it does not require ACPI or APM, although for example
136a7ee2e5fSDavid Brownell	  ACPI will be used for the final steps when it is available.  One
137a7ee2e5fSDavid Brownell	  of the reasons to use software suspend is that the firmware hooks
138a7ee2e5fSDavid Brownell	  for suspend states like suspend-to-RAM (STR) often don't work very
139a7ee2e5fSDavid Brownell	  well with Linux.
140c7276fdeSRafael J. Wysocki
141c7276fdeSRafael J. Wysocki	  It creates an image which is saved in your active swap. Upon the next
1421da177e4SLinus Torvalds	  boot, pass the 'resume=/dev/swappartition' argument to the kernel to
1431da177e4SLinus Torvalds	  have it detect the saved image, restore memory state from it, and
1441da177e4SLinus Torvalds	  continue to run as before. If you do not want the previous state to
145c7276fdeSRafael J. Wysocki	  be reloaded, then use the 'noresume' kernel command line argument.
146c7276fdeSRafael J. Wysocki	  Note, however, that fsck will be run on your filesystems and you will
147c7276fdeSRafael J. Wysocki	  need to run mkswap against the swap partition used for the suspend.
1481da177e4SLinus Torvalds
149c7276fdeSRafael J. Wysocki	  It also works with swap files to a limited extent (for details see
150c7276fdeSRafael J. Wysocki	  <file:Documentation/power/swsusp-and-swap-files.txt>).
151c7276fdeSRafael J. Wysocki
152c7276fdeSRafael J. Wysocki	  Right now you may boot without resuming and resume later but in the
153c7276fdeSRafael J. Wysocki	  meantime you cannot use the swap partition(s)/file(s) involved in
154c7276fdeSRafael J. Wysocki	  suspending.  Also in this case you must not use the filesystems
155c7276fdeSRafael J. Wysocki	  that were mounted before the suspend.  In particular, you MUST NOT
156c7276fdeSRafael J. Wysocki	  MOUNT any journaled filesystems mounted before the suspend or they
157c7276fdeSRafael J. Wysocki	  will get corrupted in a nasty way.
1581da177e4SLinus Torvalds
1591da177e4SLinus Torvalds	  For more information take a look at <file:Documentation/power/swsusp.txt>.
1601da177e4SLinus Torvalds
1611da177e4SLinus Torvaldsconfig PM_STD_PARTITION
1621da177e4SLinus Torvalds	string "Default resume partition"
163b0cb1a19SRafael J. Wysocki	depends on HIBERNATION
1641da177e4SLinus Torvalds	default ""
1651da177e4SLinus Torvalds	---help---
1661da177e4SLinus Torvalds	  The default resume partition is the partition that the suspend-
1671da177e4SLinus Torvalds	  to-disk implementation will look for a suspended disk image.
1681da177e4SLinus Torvalds
1691da177e4SLinus Torvalds	  The partition specified here will be different for almost every user.
1701da177e4SLinus Torvalds	  It should be a valid swap partition (at least for now) that is turned
1711da177e4SLinus Torvalds	  on before suspending.
1721da177e4SLinus Torvalds
1731da177e4SLinus Torvalds	  The partition specified can be overridden by specifying:
1741da177e4SLinus Torvalds
1751da177e4SLinus Torvalds		resume=/dev/<other device>
1761da177e4SLinus Torvalds
1771da177e4SLinus Torvalds	  which will set the resume partition to the device specified.
1781da177e4SLinus Torvalds
1791da177e4SLinus Torvalds	  Note there is currently not a way to specify which device to save the
1801da177e4SLinus Torvalds	  suspended image to. It will simply pick the first available swap
1811da177e4SLinus Torvalds	  device.
1821da177e4SLinus Torvalds
1837726942fSRalf Baechleconfig APM_EMULATION
1847726942fSRalf Baechle	tristate "Advanced Power Management Emulation"
1857726942fSRalf Baechle	depends on PM && SYS_SUPPORTS_APM_EMULATION
1867726942fSRalf Baechle	help
1877726942fSRalf Baechle	  APM is a BIOS specification for saving power using several different
1887726942fSRalf Baechle	  techniques. This is mostly useful for battery powered laptops with
1897726942fSRalf Baechle	  APM compliant BIOSes. If you say Y here, the system time will be
1907726942fSRalf Baechle	  reset after a RESUME operation, the /proc/apm device will provide
1917726942fSRalf Baechle	  battery status information, and user-space programs will receive
1927726942fSRalf Baechle	  notification of APM "events" (e.g. battery status change).
1937726942fSRalf Baechle
1947726942fSRalf Baechle	  In order to use APM, you will need supporting software. For location
19553471121SRandy Dunlap	  and more information, read <file:Documentation/power/pm.txt> and the
1967726942fSRalf Baechle	  Battery Powered Linux mini-HOWTO, available from
1977726942fSRalf Baechle	  <http://www.tldp.org/docs.html#howto>.
1987726942fSRalf Baechle
1997726942fSRalf Baechle	  This driver does not spin down disk drives (see the hdparm(8)
2007726942fSRalf Baechle	  manpage ("man 8 hdparm") for that), and it doesn't turn off
2017726942fSRalf Baechle	  VESA-compliant "green" monitors.
2027726942fSRalf Baechle
2037726942fSRalf Baechle	  Generally, if you don't have a battery in your machine, there isn't
2047726942fSRalf Baechle	  much point in using this driver and you should say N. If you get
2057726942fSRalf Baechle	  random kernel OOPSes or reboots that don't seem to be related to
2067726942fSRalf Baechle	  anything, try disabling/enabling this option (or disabling/enabling
2077726942fSRalf Baechle	  APM in your BIOS).
2085e928f77SRafael J. Wysocki
2095e928f77SRafael J. Wysockiconfig PM_RUNTIME
2105e928f77SRafael J. Wysocki	bool "Run-time PM core functionality"
211*1eb208aeSRafael J. Wysocki	depends on !IA64_HP_SIM
2125e928f77SRafael J. Wysocki	---help---
2135e928f77SRafael J. Wysocki	  Enable functionality allowing I/O devices to be put into energy-saving
2145e928f77SRafael J. Wysocki	  (low power) states at run time (or autosuspended) after a specified
2155e928f77SRafael J. Wysocki	  period of inactivity and woken up in response to a hardware-generated
2165e928f77SRafael J. Wysocki	  wake-up event or a driver's request.
2175e928f77SRafael J. Wysocki
2185e928f77SRafael J. Wysocki	  Hardware support is generally required for this functionality to work
2195e928f77SRafael J. Wysocki	  and the bus type drivers of the buses the devices are on are
2205e928f77SRafael J. Wysocki	  responsible for the actual handling of the autosuspend requests and
2215e928f77SRafael J. Wysocki	  wake-up events.
2226cbf8214SRafael J. Wysocki
2236cbf8214SRafael J. Wysockiconfig PM_OPS
2246cbf8214SRafael J. Wysocki	bool
2256cbf8214SRafael J. Wysocki	depends on PM_SLEEP || PM_RUNTIME
2266cbf8214SRafael J. Wysocki	default y
227e1f60b29SNishanth Menon
22843e60861SMark Brownconfig ARCH_HAS_OPP
22943e60861SMark Brown	bool
23043e60861SMark Brown
231e1f60b29SNishanth Menonconfig PM_OPP
232e1f60b29SNishanth Menon	bool "Operating Performance Point (OPP) Layer library"
23343e60861SMark Brown	depends on ARCH_HAS_OPP
234e1f60b29SNishanth Menon	---help---
235e1f60b29SNishanth Menon	  SOCs have a standard set of tuples consisting of frequency and
236e1f60b29SNishanth Menon	  voltage pairs that the device will support per voltage domain. This
237e1f60b29SNishanth Menon	  is called Operating Performance Point or OPP. The actual definitions
238e1f60b29SNishanth Menon	  of OPP varies over silicon within the same family of devices.
239e1f60b29SNishanth Menon
240e1f60b29SNishanth Menon	  OPP layer organizes the data internally using device pointers
241e1f60b29SNishanth Menon	  representing individual voltage domains and provides SOC
242e1f60b29SNishanth Menon	  implementations a ready to use framework to manage OPPs.
243e1f60b29SNishanth Menon	  For more information, read <file:Documentation/power/opp.txt>
244