Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
power.h
Go to the documentation of this file.
1/*
2 * Copyright 2024 NXP
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
12
13#ifndef _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_POWER_H_
14#define _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_POWER_H_
15
17
24
26#define SCMI_POWER_STATE_SET_FLAGS_ASYNC BIT(0)
27
29#define SCMI_POWER_DOMAIN_PROTOCOL_SUPPORTED_VERSION 0x30001
30
35
37#define SCMI_POWER_STATE_TYPE_SHIFT 30U
38
40#define SCMI_POWER_STATE_ID_MASK (BIT(28) - 1)
41
48#define SCMI_POWER_STATE_PARAM(type, id) \
49 ((((type) & BIT(0)) << SCMI_POWER_STATE_TYPE_SHIFT) | \
50 ((id) & SCMI_POWER_STATE_ID_MASK))
51
53
58
60#define SCMI_POWER_STATE_GENERIC_ON SCMI_POWER_STATE_PARAM(0, 0)
61
63#define SCMI_POWER_STATE_GENERIC_OFF SCMI_POWER_STATE_PARAM(1, 0)
64
66
81
98int scmi_power_state_get(uint32_t domain_id, uint32_t *power_state);
99
103
104#endif /* _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_POWER_H_ */
Header file for the SCMI (System Control and Management Interface) driver API.
int scmi_power_state_set(struct scmi_power_state_config *cfg)
Send the POWER_STATE_SET command and get its reply.
int scmi_power_state_get(uint32_t domain_id, uint32_t *power_state)
Query the power domain state.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Describes the parameters for the POWER_STATE_SET command.
Definition power.h:73
uint32_t power_state
Power state to set (see SCMI_POWER_STATE_PARAM).
Definition power.h:79
uint32_t flags
Request flags (see SCMI_POWER_STATE_SET_FLAGS_*).
Definition power.h:75
uint32_t domain_id
ID of the power domain to configure.
Definition power.h:77