PM: Make CONFIG_PM depend on (CONFIG_PM_SLEEP || CONFIG_PM_RUNTIME)
[firefly-linux-kernel-4.4.55.git] / kernel / power / Kconfig
1 config PM
2         bool
3         depends on PM_SLEEP || PM_RUNTIME
4         default y
5
6 config PM_DEBUG
7         bool "Power Management Debug Support"
8         depends on PM
9         ---help---
10         This option enables various debugging support in the Power Management
11         code. This is helpful when debugging and reporting PM bugs, like
12         suspend support.
13
14 config PM_ADVANCED_DEBUG
15         bool "Extra PM attributes in sysfs for low-level debugging/testing"
16         depends on PM_DEBUG
17         default n
18         ---help---
19         Add extra sysfs attributes allowing one to access some Power Management
20         fields of device objects from user space.  If you are not a kernel
21         developer interested in debugging/testing Power Management, say "no".
22
23 config PM_VERBOSE
24         bool "Verbose Power Management debugging"
25         depends on PM_DEBUG
26         default n
27         ---help---
28         This option enables verbose messages from the Power Management code.
29
30 config CAN_PM_TRACE
31         def_bool y
32         depends on PM_DEBUG && PM_SLEEP && EXPERIMENTAL
33
34 config PM_TRACE
35         bool
36         help
37           This enables code to save the last PM event point across
38           reboot. The architecture needs to support this, x86 for
39           example does by saving things in the RTC, see below.
40
41           The architecture specific code must provide the extern
42           functions from <linux/resume-trace.h> as well as the
43           <asm/resume-trace.h> header with a TRACE_RESUME() macro.
44
45           The way the information is presented is architecture-
46           dependent, x86 will print the information during a
47           late_initcall.
48
49 config PM_TRACE_RTC
50         bool "Suspend/resume event tracing"
51         depends on CAN_PM_TRACE
52         depends on X86
53         select PM_TRACE
54         default n
55         ---help---
56         This enables some cheesy code to save the last PM event point in the
57         RTC across reboots, so that you can debug a machine that just hangs
58         during suspend (or more commonly, during resume).
59
60         To use this debugging feature you should attempt to suspend the
61         machine, reboot it and then run
62
63                 dmesg -s 1000000 | grep 'hash matches'
64
65         CAUTION: this option will cause your machine's real-time clock to be
66         set to an invalid time after a resume.
67
68 config PM_SLEEP_SMP
69         bool
70         depends on SMP
71         depends on ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE
72         depends on PM_SLEEP
73         select HOTPLUG
74         select HOTPLUG_CPU
75         default y
76
77 config PM_SLEEP
78         bool
79         depends on SUSPEND || HIBERNATION || XEN_SAVE_RESTORE
80         default y
81
82 config PM_SLEEP_ADVANCED_DEBUG
83         bool
84         depends on PM_ADVANCED_DEBUG
85         default n
86
87 config SUSPEND
88         bool "Suspend to RAM and standby"
89         depends on ARCH_SUSPEND_POSSIBLE
90         default y
91         ---help---
92           Allow the system to enter sleep states in which main memory is
93           powered and thus its contents are preserved, such as the
94           suspend-to-RAM state (e.g. the ACPI S3 state).
95
96 config PM_TEST_SUSPEND
97         bool "Test suspend/resume and wakealarm during bootup"
98         depends on SUSPEND && PM_DEBUG && RTC_CLASS=y
99         ---help---
100         This option will let you suspend your machine during bootup, and
101         make it wake up a few seconds later using an RTC wakeup alarm.
102         Enable this with a kernel parameter like "test_suspend=mem".
103
104         You probably want to have your system's RTC driver statically
105         linked, ensuring that it's available when this test runs.
106
107 config SUSPEND_FREEZER
108         bool "Enable freezer for suspend to RAM/standby" \
109                 if ARCH_WANTS_FREEZER_CONTROL || BROKEN
110         depends on SUSPEND
111         default y
112         help
113           This allows you to turn off the freezer for suspend. If this is
114           done, no tasks are frozen for suspend to RAM/standby.
115
116           Turning OFF this setting is NOT recommended! If in doubt, say Y.
117
118 config HIBERNATION
119         bool "Hibernation (aka 'suspend to disk')"
120         depends on SWAP && ARCH_HIBERNATION_POSSIBLE
121         select LZO_COMPRESS
122         select LZO_DECOMPRESS
123         ---help---
124           Enable the suspend to disk (STD) functionality, which is usually
125           called "hibernation" in user interfaces.  STD checkpoints the
126           system and powers it off; and restores that checkpoint on reboot.
127
128           You can suspend your machine with 'echo disk > /sys/power/state'
129           after placing resume=/dev/swappartition on the kernel command line
130           in your bootloader's configuration file.
131
132           Alternatively, you can use the additional userland tools available
133           from <http://suspend.sf.net>.
134
135           In principle it does not require ACPI or APM, although for example
136           ACPI will be used for the final steps when it is available.  One
137           of the reasons to use software suspend is that the firmware hooks
138           for suspend states like suspend-to-RAM (STR) often don't work very
139           well with Linux.
140
141           It creates an image which is saved in your active swap. Upon the next
142           boot, pass the 'resume=/dev/swappartition' argument to the kernel to
143           have it detect the saved image, restore memory state from it, and
144           continue to run as before. If you do not want the previous state to
145           be reloaded, then use the 'noresume' kernel command line argument.
146           Note, however, that fsck will be run on your filesystems and you will
147           need to run mkswap against the swap partition used for the suspend.
148
149           It also works with swap files to a limited extent (for details see
150           <file:Documentation/power/swsusp-and-swap-files.txt>).
151
152           Right now you may boot without resuming and resume later but in the
153           meantime you cannot use the swap partition(s)/file(s) involved in
154           suspending.  Also in this case you must not use the filesystems
155           that were mounted before the suspend.  In particular, you MUST NOT
156           MOUNT any journaled filesystems mounted before the suspend or they
157           will get corrupted in a nasty way.
158
159           For more information take a look at <file:Documentation/power/swsusp.txt>.
160
161 config PM_STD_PARTITION
162         string "Default resume partition"
163         depends on HIBERNATION
164         default ""
165         ---help---
166           The default resume partition is the partition that the suspend-
167           to-disk implementation will look for a suspended disk image. 
168
169           The partition specified here will be different for almost every user. 
170           It should be a valid swap partition (at least for now) that is turned
171           on before suspending. 
172
173           The partition specified can be overridden by specifying:
174
175                 resume=/dev/<other device> 
176
177           which will set the resume partition to the device specified. 
178
179           Note there is currently not a way to specify which device to save the
180           suspended image to. It will simply pick the first available swap 
181           device.
182
183 config APM_EMULATION
184         tristate "Advanced Power Management Emulation"
185         depends on PM && SYS_SUPPORTS_APM_EMULATION
186         help
187           APM is a BIOS specification for saving power using several different
188           techniques. This is mostly useful for battery powered laptops with
189           APM compliant BIOSes. If you say Y here, the system time will be
190           reset after a RESUME operation, the /proc/apm device will provide
191           battery status information, and user-space programs will receive
192           notification of APM "events" (e.g. battery status change).
193
194           In order to use APM, you will need supporting software. For location
195           and more information, read <file:Documentation/power/pm.txt> and the
196           Battery Powered Linux mini-HOWTO, available from
197           <http://www.tldp.org/docs.html#howto>.
198
199           This driver does not spin down disk drives (see the hdparm(8)
200           manpage ("man 8 hdparm") for that), and it doesn't turn off
201           VESA-compliant "green" monitors.
202
203           Generally, if you don't have a battery in your machine, there isn't
204           much point in using this driver and you should say N. If you get
205           random kernel OOPSes or reboots that don't seem to be related to
206           anything, try disabling/enabling this option (or disabling/enabling
207           APM in your BIOS).
208
209 config PM_RUNTIME
210         bool "Run-time PM core functionality"
211         depends on !IA64_HP_SIM
212         ---help---
213           Enable functionality allowing I/O devices to be put into energy-saving
214           (low power) states at run time (or autosuspended) after a specified
215           period of inactivity and woken up in response to a hardware-generated
216           wake-up event or a driver's request.
217
218           Hardware support is generally required for this functionality to work
219           and the bus type drivers of the buses the devices are on are
220           responsible for the actual handling of the autosuspend requests and
221           wake-up events.
222
223 config PM_OPS
224         bool
225         depends on PM_SLEEP || PM_RUNTIME
226         default y
227
228 config ARCH_HAS_OPP
229         bool
230
231 config PM_OPP
232         bool "Operating Performance Point (OPP) Layer library"
233         depends on ARCH_HAS_OPP
234         ---help---
235           SOCs have a standard set of tuples consisting of frequency and
236           voltage pairs that the device will support per voltage domain. This
237           is called Operating Performance Point or OPP. The actual definitions
238           of OPP varies over silicon within the same family of devices.
239
240           OPP layer organizes the data internally using device pointers
241           representing individual voltage domains and provides SOC
242           implementations a ready to use framework to manage OPPs.
243           For more information, read <file:Documentation/power/opp.txt>