Lines Matching full:code
36 <li><code>WAKE_LOCK_SUSPEND</code>: prevents a full system suspend. </li>
37 <li><code></code><code>WAKE_LOCK_IDLE</code>: low-power states, which often cause large interrupt latencies or that disable a set of interrupts, will not be entered from idle until the wakelocks are released. </li>
39 <p>Unless the type is specified, this document refers to wakelocks of type <code>WAKE_LOCK_SUSPEND</code>. </p>
40 <p>If the suspend operation has already started when locking a wakelock, the system will abort the suspend operation as long it has not already reached the <code>suspend_late</code> stage. This means that locking a wakelock from an interrupt handler or a freezeable thread always works, but if you lock a wakelock from a <code>suspend_late</code> handler, you must also return an error from that handler to abort suspend. You can use wakelocks to allow the user-space to decide which keys should wake the full system and turn on the screen. Use <code>set_irq_wake</code> or a platform-specific API to ensure that the keypad interrupt wakes up the CPU. Once the keypad driver has resumed, the sequence of events can look like this:</p>
44 <li>The keypad-scan code detects a key change and reports it to the input-event
48 <li>The keypad-scan code detects that no keys are held and unlocks the
68 <p>A driver can use the wakelock API by adding a wakelock variable to its state and calling <code>wake_lock_init</code>, as illustrated in the snippet below:</p>
81 <p> When the driver determines that it needs to run (usually in an interrupt handler), it calls <code>wake_lock</code>:</p>
85 <p>When it no longer needs to run, it calls <code>wake_unlock</code>:</p>
89 <p> It can also call <code>wake_lock_timeout</code> to release the wakelock after a delay:</p>
95 <p>Write <code>lockname</code> or <code>lockname timeout</code> to <code>/sys/power/wake_lock</code> lock and, if needed, create a wakelock. The timeout here is specified in nanoseconds. Write <code>lockname</code> to <code>/sys/power/wake_unlock</code> to unlock a user wakelock.</p>
135 <p><ol><li>Acquire handle to the <code>PowerManager</code> service.</li>
158 <p>The Android Framework exposes power management to services and applications through the <code>PowerManager</code> class.</p>
159 <p>User space native libraries (any hardware function in <code>//device/lib/hardware/</code> meant to serve as supporting libraries for Android runtime) should never call into Android Power Management directly (see the image above). Bypassing the power management policy in the Android runtime will destabilize the system.</p>
162 <a href="http://code.google.com/android/reference/android/os/PowerManager.html">http://code.google.com/android/reference/android/os/PowerManager.html</a> for a description of the API and examples.</p>
178 <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>
180 <li><code>EARLY_SUSPEND_LEVEL_BLANK_SCREEN</code>: </li>
185 <li><code>EARLY_SUSPEND_LEVEL_STOP_DRAWING</code>:
191 <li><code>EARLY_SUSPEND_LEVEL_DISABLE_FB</code>: Turn off the framebuffer
197 <li><code>EARLY_SUSPEND_LEVEL_STOP_INPUT</code>: