Google is committed to advancing racial equity for Black communities. See how.

fuchsia.hardware.power.statecontrol

PROTOCOLS

Admin

Defined in fuchsia.hardware.power.statecontrol/admin.fidl

Provides administration services for the device manager service and the device tree it controls.

Mexec

Perfroms a kernel mexec.

Request

NameType

Response

NameType
result Admin_Mexec_Result

PowerFullyOn

Asks the device to enter a fully on state.

Request

NameType

Response

NameType
result Admin_PowerFullyOn_Result

Poweroff

Asks all devices to enter a powered off state.

Request

NameType

Response

NameType
result Admin_Poweroff_Result

Reboot

Asks the device to reboot.

Request

NameType
reason RebootReason

Response

NameType
result Admin_Reboot_Result

RebootToBootloader

Asks the device to reboot into the bootloader.

Request

NameType

Response

NameType
result Admin_RebootToBootloader_Result

RebootToRecovery

Asks the device to reboot into the recovery partition.

Request

NameType

Response

NameType
result Admin_RebootToRecovery_Result

Suspend

Ask all devices to enter into the system power state indicated by 'state'. The devices will get into a low power state, that corresponds to the system power state 'state'.

Request

NameType
state SystemPowerState

Response

NameType
result Admin_Suspend_Result

SuspendToRam

Request

NameType

Response

NameType
result Admin_SuspendToRam_Result

RebootMethodsWatcher

Defined in fuchsia.hardware.power.statecontrol/admin.fidl

Allows components to be notified when Reboot related methods are called. Watchers will be given 'MAX_REBOOT_WATCHER_RESPONSE_TIME_SECONDS' to return before the system power state is changed.

OnReboot

Request

NameType
reason RebootReason

Response

NameType

RebootMethodsWatcherRegister

Defined in fuchsia.hardware.power.statecontrol/admin.fidl

Allows components to register a callback that will be executed when a Reboot method is called. The main purpose of this protocol is to be able to track reboot reasons. Consider relying on Component Framework's orderly shutdown if you're looking at using this protocol.

Register

Register a watcher to be notified when a Reboot method is called. The Register channel will be used at most once to notify the watcher of an impending reboot and allow it the chance to respond.

Watchers can unregister by closing the underlying channel.

Request

NameType
watcher RebootMethodsWatcher

STRUCTS

Admin_Mexec_Response

Defined in fuchsia.hardware.power.statecontrol/admin.fidl

NameTypeDescriptionDefault

Admin_PowerFullyOn_Response

Defined in fuchsia.hardware.power.statecontrol/admin.fidl

NameTypeDescriptionDefault

Admin_Poweroff_Response

Defined in fuchsia.hardware.power.statecontrol/admin.fidl

NameTypeDescriptionDefault

Admin_RebootToBootloader_Response

Defined in fuchsia.hardware.power.statecontrol/admin.fidl

NameTypeDescriptionDefault

Admin_RebootToRecovery_Response

Defined in fuchsia.hardware.power.statecontrol/admin.fidl

NameTypeDescriptionDefault

Admin_Reboot_Response

Defined in fuchsia.hardware.power.statecontrol/admin.fidl

NameTypeDescriptionDefault

Admin_SuspendToRam_Response

Defined in fuchsia.hardware.power.statecontrol/admin.fidl

NameTypeDescriptionDefault

Admin_Suspend_Response

Defined in fuchsia.hardware.power.statecontrol/admin.fidl

NameTypeDescriptionDefault

ENUMS

RebootReason

Type: uint32

Defined in fuchsia.hardware.power.statecontrol/admin.fidl

Why the system reboots.

NameValueDescription
USER_REQUEST 1
SYSTEM_UPDATE 2
HIGH_TEMPERATURE 3
SESSION_FAILURE 4

Sessionmgr has failed.

SystemPowerState

Type: uint8

Defined in fuchsia.hardware.power.statecontrol/admin.fidl

NameValueDescription
FULLY_ON 1
REBOOT 2
REBOOT_BOOTLOADER 3
REBOOT_RECOVERY 4
POWEROFF 5
MEXEC 6
SUSPEND_RAM 7

UNIONS

Admin_Mexec_Result

Defined in fuchsia.hardware.power.statecontrol/admin.fidl

NameTypeDescription
response Admin_Mexec_Response
err zx/status

Admin_PowerFullyOn_Result

Defined in fuchsia.hardware.power.statecontrol/admin.fidl

NameTypeDescription
response Admin_PowerFullyOn_Response
err zx/status

Admin_Poweroff_Result

Defined in fuchsia.hardware.power.statecontrol/admin.fidl

NameTypeDescription
response Admin_Poweroff_Response
err zx/status

Admin_RebootToBootloader_Result

Defined in fuchsia.hardware.power.statecontrol/admin.fidl

NameTypeDescription
response Admin_RebootToBootloader_Response
err zx/status

Admin_RebootToRecovery_Result

Defined in fuchsia.hardware.power.statecontrol/admin.fidl

NameTypeDescription
response Admin_RebootToRecovery_Response
err zx/status

Admin_Reboot_Result

Defined in fuchsia.hardware.power.statecontrol/admin.fidl

NameTypeDescription
response Admin_Reboot_Response
err zx/status

Admin_SuspendToRam_Result

Defined in fuchsia.hardware.power.statecontrol/admin.fidl

NameTypeDescription
response Admin_SuspendToRam_Response
err zx/status

Admin_Suspend_Result

Defined in fuchsia.hardware.power.statecontrol/admin.fidl

NameTypeDescription
response Admin_Suspend_Response
err zx/status

CONSTANTS

NameValueTypeDescription
MAX_REBOOT_WATCHER_RESPONSE_TIME_SECONDS 5 uint32

The maxium number of seconds the server will wait for responses from all RebootMethodsWatchers before changing the system power state.

MAX_SYSTEM_POWER_STATES 7 uint32
SUSPEND_FLAG_MEXEC 3705406208 uint32
SUSPEND_FLAG_POWEROFF 3705405952 uint32
SUSPEND_FLAG_REBOOT 3705405696 uint32

All available suspend flags.

SUSPEND_FLAG_REBOOT_BOOTLOADER 3705405697 uint32
SUSPEND_FLAG_REBOOT_RECOVERY 3705405698 uint32
SUSPEND_FLAG_SUSPEND_RAM 3705406464 uint32