e2f33dd97c
It is well known that PM subsystem has never been optimized in terms of resource usage. The situation is particularly bad in case the PM runtime API is enabled. What this patch does is to move the responsability of PM resource definition to the device like this: - Device is responsible to define PM resources, using a new set of macros: PM_DEVICE_*DEFINE(). - DEVICE_*DEFINE macro accepts a reference to the device PM state, which can be obtained using PM_DEVICE_*REF() set of macros. This allows device to initialize the dev->pm reference. This method decouples a bit more PM from devices since devices just keep a reference to the device PM state. It also means that future PM changes will have less chances to impact all devices, but only devices that support PM. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no> |
||
---|---|---|
.. | ||
device.h | ||
device_runtime.h | ||
pm.h | ||
policy.h | ||
state.h |