-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Description
Introduction
This issue documents and tracks the changes needed to refactor PM device to achieve what is proposed in #84049.
High level steps
-
Use power domains/devices to dictate system state constraints instead of system state controling power domains/devices PM_DEVICE_POWER_DOMAIN refactor #89372
-
Replace uses of
PM_DEVICE_SYSTEM_MANAGED
withPM_DEVICE_RUNTIME
in all applications. -
Remove
PM_DEVICE_SYSTEM_MANAGED
. The system state will not be used to manage devices, this option therefore has no utility, and shall be removed. -
Remove
pm_device_runtime_enable()
and thezephyr,pm-device-runtime-auto
devicetree property. All devices will be managed byPM_DEVICE_RUNTIME
if enabled, disabling it per device is not a valid pm device configuration. -
Clean up all device drivers. This includes the following:
- Use
pm_device_driver_init()
instead of callingpm_device_runtime_enable()
,pm_device_init_suspended()
etc. - Use pm_device_runtime_ APIs for resuming device dependencies like busses, pwms, etc, from device drivers.
note: we will not remove inline calls to self get/put in
can_start()
ori2c_transfer()
until step 7. - Use
-
Adjust subsystems and applications (samples) which currently use pm_device_action_run to solely use pm_device_runtime APIs.
-
Remove inline self get/put calls from device drivers, like often present in
can_start()
/can_stop()
ori2c_transfer()
. These are no longer needed as applications/subsystems are mandated to call these APIs before and after using the device.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status