pm: device: move device busy APIs to pm subsystem
The following device busy APIs: - device_busy_set() - device_busy_clear() - device_busy_check() - device_any_busy_check() were used for device PM, so they have been moved to the pm subsystem. This means they are now prefixed with `pm_` and are defined in `pm/device.h`. If device PM is not enabled dummy functions are now provided that do nothing or return `-ENOSYS`, meaning that the functionality is not available. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
775cf55d92
commit
70322853a8
11 changed files with 112 additions and 119 deletions
|
@ -24,7 +24,7 @@ void main(void)
|
|||
printk("Device ready\n");
|
||||
|
||||
/* Don't let the system power off / low power this device */
|
||||
device_busy_set(led.port);
|
||||
pm_device_busy_set(led.port);
|
||||
|
||||
while (true) {
|
||||
gpio_pin_configure_dt(&led, GPIO_OUTPUT_ACTIVE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue