Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

System Power Management API. More...

Modules

 Hooks
 System Power Management Hooks.
 
 Policy
 System Power Management Policy API.
 

Data Structures

struct  pm_notifier
 Power management notifier struct. More...
 

Functions

bool pm_state_force (uint8_t cpu, const struct pm_state_info *info)
 Force usage of given power state.
 
void pm_notifier_register (struct pm_notifier *notifier)
 Register a power management notifier.
 
int pm_notifier_unregister (struct pm_notifier *notifier)
 Unregister a power management notifier.
 
const struct pm_state_infopm_state_next_get (uint8_t cpu)
 Gets the next power state that will be used.
 

Detailed Description

System Power Management API.

Since
1.2

Function Documentation

◆ pm_notifier_register()

void pm_notifier_register ( struct pm_notifier notifier)

#include <zephyr/pm/pm.h>

Register a power management notifier.

Register the given notifier from the power management notification list.

Parameters
notifierpm_notifier object to be registered.

◆ pm_notifier_unregister()

int pm_notifier_unregister ( struct pm_notifier notifier)

#include <zephyr/pm/pm.h>

Unregister a power management notifier.

Remove the given notifier from the power management notification list. After that this object callbacks will not be called.

Parameters
notifierpm_notifier object to be unregistered.
Returns
0 if the notifier was successfully removed, a negative value otherwise.

◆ pm_state_force()

bool pm_state_force ( uint8_t  cpu,
const struct pm_state_info info 
)

#include <zephyr/pm/pm.h>

Force usage of given power state.

This function overrides decision made by PM policy forcing usage of given power state upon next entry of the idle thread.

Note
This function can only run in thread context
Parameters
cpuCPU index.
infoPower state which should be used in the ongoing suspend operation.

◆ pm_state_next_get()

const struct pm_state_info * pm_state_next_get ( uint8_t  cpu)

#include <zephyr/pm/pm.h>

Gets the next power state that will be used.

This function returns the next power state that will be used by the SoC.

Parameters
cpuCPU index.
Returns
next pm_state_info that will be used