page.title=Early Suspend
pdk.version=1.0
@jd:body
The early-suspend API allows drivers to get notified when user-space writes to /sys/power/request_state to indicate that the user visible sleep state should change. Suspend handlers are called in order of low to high (4 - 1 below) and resume handlers are called in order of high to low (1 - 4 below).
EARLY_SUSPEND_LEVEL_BLANK_SCREEN:
- on suspend: the screen should be turned off but the framebuffer must still be accessible.
- on resume: the screen can be turned back on.
EARLY_SUSPEND_LEVEL_STOP_DRAWING:
- on suspend: this level notifies user-space that it should stop accessing the framebuffer and it waits for it to complete.
- on resume: it notifies user-space that it should resume screen access. Two methods are provided, console switch or a sysfs interface.
EARLY_SUSPEND_LEVEL_DISABLE_FB: Turn off the framebuffer
- on suspend: turn off the framebuffer
- on resume: turn the framebuffer back on.
EARLY_SUSPEND_LEVEL_STOP_INPUT:
- on suspend: turn off input devices that are not capable of wakeup or where wakeup is disabled.
- on resume: turn the same devices back on.