Zephyr API 3.6.99
|
System Power Management API . More...
Topics | |
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_info * | pm_state_next_get (uint8_t cpu) |
Gets the next power state that will be used. | |
void | pm_system_resume (void) |
Notify exit from kernel sleep. | |
System Power Management API .
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.
notifier | pm_notifier object to be registered. |
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.
notifier | pm_notifier object to be unregistered. |
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.
cpu | CPU index. |
info | Power state which should be used in the ongoing suspend operation. |
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.
cpu | CPU index. |
void pm_system_resume | ( | void | ) |
#include <zephyr/pm/pm.h>
Notify exit from kernel sleep.
This function would notify exit from kernel idling if a corresponding pm_system_suspend() notification was handled and did not return PM_STATE_ACTIVE.
This function should be called from the ISR context of the event that caused the exit from kernel idling.
This is required for cpu power states that would require interrupts to be enabled while entering low power states. e.g. C1 in x86. In those cases, the ISR would be invoked immediately after the event wakes up the CPU, before code following the CPU wait, gets a chance to execute. This can be ignored if no operation needs to be done at the wake event notification.