File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 1111#include <drivers/gpio/gpio_emul.h>
1212#include <errno.h>
1313#include <zephyr.h>
14+ #include <pm/device.h>
1415
1516#include "gpio_utils.h"
1617
@@ -662,6 +663,19 @@ static int gpio_emul_init(const struct device *dev)
662663 return k_mutex_init (& drv_data -> mu );
663664}
664665
666+ #ifdef CONFIG_PM_DEVICE
667+ static int gpio_emul_pm_device_ctrl (const struct device * dev ,
668+ enum pm_device_action action )
669+ {
670+ ARG_UNUSED (dev );
671+ ARG_UNUSED (action );
672+
673+ return 0 ;
674+ }
675+ #else
676+ #define gpio_emul_pm_device_ctrl NULL
677+ #endif
678+
665679/*
666680 * Device Initialization
667681 */
@@ -696,7 +710,7 @@ static int gpio_emul_init(const struct device *dev)
696710 }; \
697711 \
698712 DEVICE_DT_INST_DEFINE(_num, gpio_emul_init, \
699- NULL, \
713+ gpio_emul_pm_device_ctrl, \
700714 &gpio_emul_data_##_num, \
701715 &gpio_emul_config_##_num, POST_KERNEL, \
702716 CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
You can’t perform that action at this time.
0 commit comments