PM: earlysuspend: Removing dependence on console.
[firefly-linux-kernel-4.4.55.git] / kernel / power / Kconfig
index 72067cbdb37f0839819db9280c1e42b8c250f9d8..1621b707647e76b716d617962464c8de549d7a91 100644 (file)
@@ -119,6 +119,73 @@ config SUSPEND_FREEZER
 config HIBERNATION_NVS
        bool
 
+config HAS_WAKELOCK
+       bool
+
+config HAS_EARLYSUSPEND
+       bool
+
+config WAKELOCK
+       bool "Wake lock"
+       depends on PM && RTC_CLASS
+       default n
+       select HAS_WAKELOCK
+       ---help---
+         Enable wakelocks. When user space request a sleep state the
+         sleep request will be delayed until no wake locks are held.
+
+config WAKELOCK_STAT
+       bool "Wake lock stats"
+       depends on WAKELOCK
+       default y
+       ---help---
+         Report wake lock stats in /proc/wakelocks
+
+config USER_WAKELOCK
+       bool "Userspace wake locks"
+       depends on WAKELOCK
+       default y
+       ---help---
+         User-space wake lock api. Write "lockname" or "lockname timeout"
+         to /sys/power/wake_lock lock and if needed create a wake lock.
+         Write "lockname" to /sys/power/wake_unlock to unlock a user wake
+         lock.
+
+config EARLYSUSPEND
+       bool "Early suspend"
+       depends on WAKELOCK
+       default y
+       select HAS_EARLYSUSPEND
+       ---help---
+         Call early suspend handlers when the user requested sleep state
+         changes.
+
+choice
+       prompt "User-space screen access"
+       default FB_EARLYSUSPEND if !FRAMEBUFFER_CONSOLE
+       default CONSOLE_EARLYSUSPEND
+       depends on HAS_EARLYSUSPEND
+
+       config NO_USER_SPACE_SCREEN_ACCESS_CONTROL
+               bool "None"
+
+       config CONSOLE_EARLYSUSPEND
+               bool "Console switch on early-suspend"
+               depends on HAS_EARLYSUSPEND && VT
+               ---help---
+                 Register early suspend handler to perform a console switch to
+                 when user-space should stop drawing to the screen and a switch
+                 back when it should resume.
+
+       config FB_EARLYSUSPEND
+               bool "Sysfs interface"
+               depends on HAS_EARLYSUSPEND
+               ---help---
+                 Register early suspend handler that notifies and waits for
+                 user-space through sysfs when user-space should stop drawing
+                 to the screen and notifies user-space when it should resume.
+endchoice
+
 config HIBERNATION
        bool "Hibernation (aka 'suspend to disk')"
        depends on PM && SWAP && ARCH_HIBERNATION_POSSIBLE
@@ -208,3 +275,17 @@ config APM_EMULATION
          random kernel OOPSes or reboots that don't seem to be related to
          anything, try disabling/enabling this option (or disabling/enabling
          APM in your BIOS).
+
+config PM_RUNTIME
+       bool "Run-time PM core functionality"
+       depends on PM
+       ---help---
+         Enable functionality allowing I/O devices to be put into energy-saving
+         (low power) states at run time (or autosuspended) after a specified
+         period of inactivity and woken up in response to a hardware-generated
+         wake-up event or a driver's request.
+
+         Hardware support is generally required for this functionality to work
+         and the bus type drivers of the buses the devices are on are
+         responsible for the actual handling of the autosuspend requests and
+         wake-up events.