pm: device_runtime: add pm_device_runtime_init_suspended
By default device state is initialized to PM_DEVICE_STATE_ACTIVE. In
general, this makes sense because the device initialization function
will resume and configure a device, leaving it operational. However,
when device runtime PM is enabled, the device may not be resumed and the
init function will just enable device runtime PM. If that is the case,
this function can be used to set the initial device state to
PM_DEVICE_STATE_SUSPENDED.
Documentation has been updated to comment on this case, and example code
has been adjusted accordingly.
Signed-off-by:
Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Loading
Please sign in to comment