David Warren | eb98133 | 2009-05-13 12:00:07 -0700 | [diff] [blame^] | 1 | page.title=Early Suspend |
| 2 | pdk.version=1.0 |
| 3 | @jd:body |
| 4 | <p>The early-suspend API allows drivers to get notified when user-space writes to <code>/sys/power/request_state</code> 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).</p> |
| 5 | <ol> |
| 6 | <li><code>EARLY_SUSPEND_LEVEL_BLANK_SCREEN</code>: </li> |
| 7 | <ul> |
| 8 | <li>on suspend: the screen should be turned off but the framebuffer must still be accessible. </li> |
| 9 | <li>on resume: the screen can be turned back on.</li> |
| 10 | </ul> |
| 11 | <li><code>EARLY_SUSPEND_LEVEL_STOP_DRAWING</code>: |
| 12 | <ul> |
| 13 | <li>on suspend: this level notifies user-space that it should stop accessing the framebuffer and it waits for it to complete.</li> |
| 14 | <li>on resume: it notifies user-space that it should resume screen access. Two methods are provided, console switch or a sysfs interface.</li> |
| 15 | </ul> |
| 16 | </li> |
| 17 | <li><code>EARLY_SUSPEND_LEVEL_DISABLE_FB</code>: Turn off the framebuffer |
| 18 | <ul> |
| 19 | <li>on suspend: turn off the framebuffer</li> |
| 20 | <li>on resume: turn the framebuffer back on. </li> |
| 21 | </ul> |
| 22 | </li> |
| 23 | <li><code>EARLY_SUSPEND_LEVEL_STOP_INPUT</code>: |
| 24 | <ul> |
| 25 | <li>on suspend: turn off input devices that are not capable of wakeup or where wakeup is disabled. </li> |
| 26 | <li>on resume: turn the same devices back on.</li> |
| 27 | </ul> |
| 28 | </li> |
| 29 | </ol> |