Basic Usage
Preventing system suspension to handle an event
If you want to keep the system awake to process an event, which might be an
interrupt or responding to a FIDL request, there is a very simple API for this.
fuchsia.power.system/ActivityGovernor.AcquireWakeLease
returns a LeaseToken
which prevents system suspension as long
as the token exists. If you are a driver processing an interrupt, you can ACK
the interrupt after getting the LeaseToken
. After you are done processing the
event, simply drop the LeaseToken
.
There are actually not that many use cases that are this simple on Fuchsia. Many
use cases require keeping the system awake while passing the event along to
another component. The next section discusses this use
case.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-28 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-28 UTC."],[],[]]