Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
system.h File Reference

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.

Detailed Description

SCMI System Power Management Protocol.

Macro Definition Documentation

◆ SCMI_SYSTEM_MSG_ATTR_SUSPEND

#define SCMI_SYSTEM_MSG_ATTR_SUSPEND   (1 << SCMI_SYSTEM_MSG_ATTR_SUSPEND_SHIFT)

System suspend support.

◆ SCMI_SYSTEM_MSG_ATTR_WARM_RESET

#define SCMI_SYSTEM_MSG_ATTR_WARM_RESET   (1 << SCMI_SYSTEM_MSG_ATTR_WARM_RESET_SHIFT)

System warm reset support.

◆ SCMI_SYSTEM_POWER_FLAG_FORCEFUL

#define SCMI_SYSTEM_POWER_FLAG_FORCEFUL   (0 << SCMI_SYSTEM_POWER_FLAG_SHIFT)

< Forceful request

Graceful request

◆ SCMI_SYSTEM_POWER_FLAG_GRACEFUL

#define SCMI_SYSTEM_POWER_FLAG_GRACEFUL   (1 << SCMI_SYSTEM_POWER_FLAG_SHIFT)

◆ SCMI_SYSTEM_POWER_PROTOCOL_SUPPORTED_VERSION

#define SCMI_SYSTEM_POWER_PROTOCOL_SUPPORTED_VERSION   0x20001

◆ SCMI_SYSTEM_POWER_STATE_COLD_RESET

#define SCMI_SYSTEM_POWER_STATE_COLD_RESET   0x00000001U

Warm reset.

◆ SCMI_SYSTEM_POWER_STATE_POWER_UP

#define SCMI_SYSTEM_POWER_STATE_POWER_UP   0x00000003U

Suspend.

◆ SCMI_SYSTEM_POWER_STATE_SHUTDOWN

#define SCMI_SYSTEM_POWER_STATE_SHUTDOWN   0x00000000U

< Shutdown off

Cold reset

◆ SCMI_SYSTEM_POWER_STATE_SUSPEND

#define SCMI_SYSTEM_POWER_STATE_SUSPEND   0x00000004U

◆ SCMI_SYSTEM_POWER_STATE_WARM_RESET

#define SCMI_SYSTEM_POWER_STATE_WARM_RESET   0x00000002U

Power up.

Enumeration Type Documentation

◆ scmi_system_message

System protocol command message IDs.

Enumerator
SCMI_SYSTEM_MSG_PROTOCOL_VERSION 
SCMI_SYSTEM_MSG_PROTOCOL_ATTRIBUTES 
SCMI_SYSTEM_MSG_MESSAGE_ATTRIBUTES 
SCMI_SYSTEM_MSG_POWER_STATE_SET 
SCMI_SYSTEM_MSG_POWER_STATE_NOTIFY 
SCMI_SYSTEM_MSG_NEGOTIATE_PROTOCOL_VERSION 

Function Documentation

◆ scmi_system_power_state_set()

int scmi_system_power_state_set ( struct scmi_system_power_state_config * cfg)

Set system power state.

Parameters
cfgpointer to power state configuration
Return values
0if successful
negativeerrno if failure

◆ scmi_system_protocol_attributes()

int scmi_system_protocol_attributes ( uint32_t * attributes)

Get protocol attributes.

Parameters
attributesProtocol attributes
Return values
0if successful
negativeerrno if failure

◆ scmi_system_protocol_message_attributes()

int scmi_system_protocol_message_attributes ( uint32_t message_id,
uint32_t * attributes )

Get protocol message attributes.

Parameters
message_idMessage ID of the message
attributesMessage attributes
Return values
0if successful
negativeerrno if failure

◆ scmi_system_protocol_version()

int scmi_system_protocol_version ( uint32_t * version)

Get protocol version.

Parameters
versionProtocol version
Return values
0if successful
negativeerrno if failure

◆ scmi_system_protocol_version_negotiate()

int scmi_system_protocol_version_negotiate ( uint32_t version)

Negotiate protocol version.

Parameters
versiondesired protocol version
Return values
0if successful
negativeerrno if failure