30
30
#include <zephyr/drivers/uart.h>
31
31
#include <zephyr/drivers/clock_control.h>
32
32
#include <zephyr/pm/policy.h>
33
- #include <zephyr/pm/device.h>
34
33
#include <zephyr/sys/sys_io.h>
35
34
#include <zephyr/spinlock.h>
36
35
#include <zephyr/irq.h>
@@ -733,22 +732,6 @@ static int uart_ns16550_configure(const struct device *dev,
733
732
return ret ;
734
733
};
735
734
736
- __maybe_unused static int uart_ns16550_pm_action (const struct device * dev ,
737
- enum pm_device_action action )
738
- {
739
- struct uart_ns16550_dev_data * data = dev -> data ;
740
- struct uart_config * uart_cfg = & data -> uart_config ;
741
-
742
- switch (action ) {
743
- case PM_DEVICE_ACTION_RESUME :
744
- return uart_ns16550_configure (dev , uart_cfg );
745
- case PM_DEVICE_ACTION_SUSPEND :
746
- return 0 ;
747
- default :
748
- return - ENOTSUP ;
749
- }
750
- }
751
-
752
735
#ifdef CONFIG_UART_USE_RUNTIME_CONFIGURE
753
736
static int uart_ns16550_config_get (const struct device * dev ,
754
737
struct uart_config * cfg )
@@ -1996,8 +1979,7 @@ static DEVICE_API(uart, uart_ns16550_driver_api) = {
1996
1979
static struct uart_ns16550_dev_data uart_ns16550_dev_data_##n = { \
1997
1980
UART_NS16550_COMMON_DEV_DATA_INITIALIZER(n) \
1998
1981
}; \
1999
- PM_DEVICE_DT_INST_DEFINE(n, uart_ns16550_pm_action); \
2000
- DEVICE_DT_INST_DEFINE(n, uart_ns16550_init, PM_DEVICE_DT_INST_GET(n), \
1982
+ DEVICE_DT_INST_DEFINE(n, uart_ns16550_init, NULL, \
2001
1983
&uart_ns16550_dev_data_##n, &uart_ns16550_dev_cfg_##n, \
2002
1984
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \
2003
1985
&uart_ns16550_driver_api); \
@@ -2015,8 +1997,7 @@ static DEVICE_API(uart, uart_ns16550_driver_api) = {
2015
1997
static struct uart_ns16550_dev_data uart_ns16550_dev_data_##n = { \
2016
1998
UART_NS16550_COMMON_DEV_DATA_INITIALIZER(n) \
2017
1999
}; \
2018
- PM_DEVICE_DT_INST_DEFINE(n, uart_ns16550_pm_action); \
2019
- DEVICE_DT_INST_DEFINE(n, uart_ns16550_init, PM_DEVICE_DT_INST_GET(n), \
2000
+ DEVICE_DT_INST_DEFINE(n, uart_ns16550_init, NULL, \
2020
2001
&uart_ns16550_dev_data_##n, &uart_ns16550_dev_cfg_##n, \
2021
2002
PRE_KERNEL_1, \
2022
2003
CONFIG_SERIAL_INIT_PRIORITY, \
0 commit comments