Kconfig 10 KB

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