| <!-- |
| Copyright 2023 The Fuchsia Authors. All rights reserved. |
| Use of this source code is governed by a BSD-style license that can be |
| found in the LICENSE file. |
| |
| DO NOT EDIT. Generated from FIDL library zx by zither, a Fuchsia platform tool. |
| |
| See //docs/reference/syscalls/README.md#documentation-generation for |
| regeneration instructions. |
| --> |
| |
| # zx_system_set_processor_power_state |
| |
| ## Summary |
| |
| Updates the current processor power level state as observed by the kernel. |
| Note: Process must use next-vdso. |
| |
| |
| ## Declaration |
| |
| ```c |
| #include <zircon/syscalls-next.h> |
| |
| zx_status_t zx_system_set_processor_power_state(zx_handle_t port, |
| const zx_processor_power_state_t* power_state); |
| ``` |
| |
| ## Description |
| |
| `port` must be of type `ZX_OBJ_TYPE_PORT` and must be the same port where the power domain |
| transition requests are queued. The `port` is the capability for updating a specific |
| power domain. |
| |
| `power_state` is the power state of the domain provided in `power_state.target_id`. |
| |
| ## Rights |
| `port` must have `ZX_RIGHT_IO`. |
| |
| ## Errors |
| |
| `ZX_ERR_ACCESS_DENIED` if `port` is not the one registered with the power domain. |
| |
| `ZX_ERR_WRONG_TYPE` if `port` is not of type `ZX_OBJ_TYPE_PORT`. |
| |
| `ZX_ERR_INVALID_ARGS` if `power_state` transition is not present in the registered energy model. |