| 
    Zephyr Project API
    3.4.0
    
   A Scalable Open Source RTOS 
   | 
 
#include <zephyr/device.h>#include <zephyr/kernel.h>#include <zephyr/sys/atomic.h>#include <zephyr/sys/iterable_sections.h>Go to the source code of this file.
Data Structures | |
| struct | pm_device | 
| Device PM info.  More... | |
Macros | |
| #define | PM_DEVICE_DEFINE(dev_id, pm_action_cb) Z_PM_DEVICE_DEFINE(DT_INVALID_NODE, dev_id, pm_action_cb) | 
| #define | PM_DEVICE_DT_DEFINE(node_id, pm_action_cb) | 
| #define | PM_DEVICE_DT_INST_DEFINE(idx, pm_action_cb) | 
| #define | PM_DEVICE_GET(dev_id) Z_PM_DEVICE_GET(dev_id) | 
| Obtain a reference to the device PM resources for the given device.  More... | |
| #define | PM_DEVICE_DT_GET(node_id) PM_DEVICE_GET(Z_DEVICE_DT_DEV_ID(node_id)) | 
| Obtain a reference to the device PM resources for the given node.  More... | |
| #define | PM_DEVICE_DT_INST_GET(idx) PM_DEVICE_DT_GET(DT_DRV_INST(idx)) | 
| Obtain a reference to the device PM resources for the given instance.  More... | |
Typedefs | |
| typedef int(* | pm_device_action_cb_t) (const struct device *dev, enum pm_device_action action) | 
| Device PM action callback.  More... | |
| typedef bool(* | pm_device_action_failed_cb_t) (const struct device *dev, int err) | 
| Device PM action failed callback.  More... | |
Enumerations | |
| enum | pm_device_state { PM_DEVICE_STATE_ACTIVE , PM_DEVICE_STATE_SUSPENDED , PM_DEVICE_STATE_SUSPENDING , PM_DEVICE_STATE_OFF } | 
| Device power states.  More... | |
| enum | pm_device_action { PM_DEVICE_ACTION_SUSPEND , PM_DEVICE_ACTION_RESUME , PM_DEVICE_ACTION_TURN_OFF , PM_DEVICE_ACTION_TURN_ON } | 
| Device PM actions.  More... | |
Functions | |
| const char * | pm_device_state_str (enum pm_device_state state) | 
| Get name of device PM state.  More... | |
| int | pm_device_action_run (const struct device *dev, enum pm_device_action action) | 
| Run a pm action on a device.  More... | |
| void | pm_device_children_action_run (const struct device *dev, enum pm_device_action action, pm_device_action_failed_cb_t failure_cb) | 
| Run a pm action on all children of a device.  More... | |
| int | pm_device_state_get (const struct device *dev, enum pm_device_state *state) | 
| Obtain the power state of a device.  More... | |
| static void | pm_device_init_suspended (const struct device *dev) | 
| Initialize a device state to PM_DEVICE_STATE_SUSPENDED.  More... | |
| static void | pm_device_init_off (const struct device *dev) | 
| Initialize a device state to PM_DEVICE_STATE_OFF.  More... | |
| void | pm_device_busy_set (const struct device *dev) | 
| Mark a device as busy.  More... | |
| void | pm_device_busy_clear (const struct device *dev) | 
| Clear a device busy status.  More... | |
| bool | pm_device_is_any_busy (void) | 
| Check if any device is busy.  More... | |
| bool | pm_device_is_busy (const struct device *dev) | 
| Check if a device is busy.  More... | |
| bool | pm_device_wakeup_enable (const struct device *dev, bool enable) | 
| Enable or disable a device as a wake up source.  More... | |
| bool | pm_device_wakeup_is_enabled (const struct device *dev) | 
| Check if a device is enabled as a wake up source.  More... | |
| bool | pm_device_wakeup_is_capable (const struct device *dev) | 
| Check if a device is wake up capable.  More... | |
| void | pm_device_state_lock (const struct device *dev) | 
| Lock current device state.  More... | |
| void | pm_device_state_unlock (const struct device *dev) | 
| Unlock the current device state.  More... | |
| bool | pm_device_state_is_locked (const struct device *dev) | 
| Check if the device pm is locked.  More... | |
| bool | pm_device_on_power_domain (const struct device *dev) | 
| Check if the device is on a switchable power domain.  More... | |
| int | pm_device_power_domain_add (const struct device *dev, const struct device *domain) | 
| Add a device to a power domain.  More... | |
| int | pm_device_power_domain_remove (const struct device *dev, const struct device *domain) | 
| Remove a device from a power domain.  More... | |
| bool | pm_device_is_powered (const struct device *dev) | 
| Check if the device is currently powered.  More... | |