From 4b0ea27fc8202b21ce338c82b55eee9c281bd7da Mon Sep 17 00:00:00 2001 From: Rebecca Schultz Date: Thu, 17 Jul 2008 18:14:55 -0700 Subject: PM: earlysuspend: Removing dependence on console. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rather than signaling a full update of the display from userspace via a console switch, this patch introduces 2 files int /sys/power, wait_for_fb_sleep and wait_for_fb_wake. Reading these files will block until the requested state has been entered. When a read from wait_for_fb_sleep returns userspace should stop drawing. When wait_for_fb_wake returns, it should do a full update. If either are called when the fb driver is already in the requested state, they will return immediately. Signed-off-by: Rebecca Schultz Signed-off-by: Arve Hjønnevåg --- kernel/power/Kconfig | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'kernel/power/Kconfig') diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig index 625d65318ed..a70f6c82063 100644 --- a/kernel/power/Kconfig +++ b/kernel/power/Kconfig @@ -61,6 +61,7 @@ config EARLYSUSPEND choice prompt "User-space screen access" + default FB_EARLYSUSPEND if !FRAMEBUFFER_CONSOLE default CONSOLE_EARLYSUSPEND depends on HAS_EARLYSUSPEND @@ -74,6 +75,14 @@ choice 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 HIBERNATE_CALLBACKS -- cgit v1.2.3