|
Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
|
SCMI System Power Management Protocol. More...
Go to the source code of this file.
Data Structures | |
| struct | scmi_system_power_state_config |
| System power state configuration. More... | |
Macros | |
| #define | SCMI_SYSTEM_POWER_PROTOCOL_SUPPORTED_VERSION 0x20001 |
Standard SCMI System Power States | |
| #define | SCMI_SYSTEM_POWER_STATE_SHUTDOWN 0x00000000U |
| < Shutdown off | |
| #define | SCMI_SYSTEM_POWER_STATE_COLD_RESET 0x00000001U |
| Warm reset. | |
| #define | SCMI_SYSTEM_POWER_STATE_WARM_RESET 0x00000002U |
| Power up. | |
| #define | SCMI_SYSTEM_POWER_STATE_POWER_UP 0x00000003U |
| Suspend. | |
| #define | SCMI_SYSTEM_POWER_STATE_SUSPEND 0x00000004U |
System Power State flags | |
| #define | SCMI_SYSTEM_POWER_FLAG_FORCEFUL (0 << SCMI_SYSTEM_POWER_FLAG_SHIFT) |
| < Forceful request | |
| #define | SCMI_SYSTEM_POWER_FLAG_GRACEFUL (1 << SCMI_SYSTEM_POWER_FLAG_SHIFT) |
SCMI system message attributes | |
| #define | SCMI_SYSTEM_MSG_ATTR_SUSPEND (1 << SCMI_SYSTEM_MSG_ATTR_SUSPEND_SHIFT) |
| System suspend support. | |
| #define | SCMI_SYSTEM_MSG_ATTR_WARM_RESET (1 << SCMI_SYSTEM_MSG_ATTR_WARM_RESET_SHIFT) |
| System warm reset support. | |
Enumerations | |
| enum | scmi_system_message { SCMI_SYSTEM_MSG_PROTOCOL_VERSION = 0x0 , SCMI_SYSTEM_MSG_PROTOCOL_ATTRIBUTES = 0x1 , SCMI_SYSTEM_MSG_MESSAGE_ATTRIBUTES = 0x2 , SCMI_SYSTEM_MSG_POWER_STATE_SET = 0x3 , SCMI_SYSTEM_MSG_POWER_STATE_NOTIFY = 0x5 , SCMI_SYSTEM_MSG_NEGOTIATE_PROTOCOL_VERSION = 0x10 } |
| System protocol command message IDs. More... | |
Functions | |
| int | scmi_system_protocol_version (uint32_t *version) |
| Get protocol version. | |
| int | scmi_system_protocol_attributes (uint32_t *attributes) |
| Get protocol attributes. | |
| int | scmi_system_protocol_message_attributes (uint32_t message_id, uint32_t *attributes) |
| Get protocol message attributes. | |
| int | scmi_system_protocol_version_negotiate (uint32_t version) |
| Negotiate protocol version. | |
| int | scmi_system_power_state_set (struct scmi_system_power_state_config *cfg) |
| Set system power state. | |
SCMI System Power Management Protocol.
| #define SCMI_SYSTEM_MSG_ATTR_SUSPEND (1 << SCMI_SYSTEM_MSG_ATTR_SUSPEND_SHIFT) |
System suspend support.
| #define SCMI_SYSTEM_MSG_ATTR_WARM_RESET (1 << SCMI_SYSTEM_MSG_ATTR_WARM_RESET_SHIFT) |
System warm reset support.
| #define SCMI_SYSTEM_POWER_FLAG_FORCEFUL (0 << SCMI_SYSTEM_POWER_FLAG_SHIFT) |
< Forceful request
Graceful request
| #define SCMI_SYSTEM_POWER_FLAG_GRACEFUL (1 << SCMI_SYSTEM_POWER_FLAG_SHIFT) |
| #define SCMI_SYSTEM_POWER_PROTOCOL_SUPPORTED_VERSION 0x20001 |
| #define SCMI_SYSTEM_POWER_STATE_COLD_RESET 0x00000001U |
Warm reset.
| #define SCMI_SYSTEM_POWER_STATE_POWER_UP 0x00000003U |
Suspend.
| #define SCMI_SYSTEM_POWER_STATE_SHUTDOWN 0x00000000U |
< Shutdown off
Cold reset
| #define SCMI_SYSTEM_POWER_STATE_SUSPEND 0x00000004U |
| #define SCMI_SYSTEM_POWER_STATE_WARM_RESET 0x00000002U |
Power up.
| enum scmi_system_message |
| int scmi_system_power_state_set | ( | struct scmi_system_power_state_config * | cfg | ) |
Set system power state.
| cfg | pointer to power state configuration |
| 0 | if successful |
| negative | errno if failure |
| int scmi_system_protocol_attributes | ( | uint32_t * | attributes | ) |
Get protocol attributes.
| attributes | Protocol attributes |
| 0 | if successful |
| negative | errno if failure |
Get protocol message attributes.
| message_id | Message ID of the message |
| attributes | Message attributes |
| 0 | if successful |
| negative | errno if failure |
| int scmi_system_protocol_version | ( | uint32_t * | version | ) |
Get protocol version.
| version | Protocol version |
| 0 | if successful |
| negative | errno if failure |
| int scmi_system_protocol_version_negotiate | ( | uint32_t | version | ) |
Negotiate protocol version.
| version | desired protocol version |
| 0 | if successful |
| negative | errno if failure |