Skip to content

Commit ad998d6

Browse files
committed
Revert "driver: serial: uart_ns16550: Add pm support for uart_ns16550 driver"
This reverts commit fd88386, it breaks uart support on ITE platforms when PM is enabled but PM_RUNTIME is not, possibly others as well. Signed-off-by: Fabio Baltieri <[email protected]>
1 parent 47b07e5 commit ad998d6

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed

drivers/serial/uart_ns16550.c

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include <zephyr/drivers/uart.h>
3131
#include <zephyr/drivers/clock_control.h>
3232
#include <zephyr/pm/policy.h>
33-
#include <zephyr/pm/device.h>
3433
#include <zephyr/sys/sys_io.h>
3534
#include <zephyr/spinlock.h>
3635
#include <zephyr/irq.h>
@@ -733,22 +732,6 @@ static int uart_ns16550_configure(const struct device *dev,
733732
return ret;
734733
};
735734

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-
752735
#ifdef CONFIG_UART_USE_RUNTIME_CONFIGURE
753736
static int uart_ns16550_config_get(const struct device *dev,
754737
struct uart_config *cfg)
@@ -1996,8 +1979,7 @@ static DEVICE_API(uart, uart_ns16550_driver_api) = {
19961979
static struct uart_ns16550_dev_data uart_ns16550_dev_data_##n = { \
19971980
UART_NS16550_COMMON_DEV_DATA_INITIALIZER(n) \
19981981
}; \
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, \
20011983
&uart_ns16550_dev_data_##n, &uart_ns16550_dev_cfg_##n, \
20021984
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \
20031985
&uart_ns16550_driver_api); \
@@ -2015,8 +1997,7 @@ static DEVICE_API(uart, uart_ns16550_driver_api) = {
20151997
static struct uart_ns16550_dev_data uart_ns16550_dev_data_##n = { \
20161998
UART_NS16550_COMMON_DEV_DATA_INITIALIZER(n) \
20171999
}; \
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, \
20202001
&uart_ns16550_dev_data_##n, &uart_ns16550_dev_cfg_##n, \
20212002
PRE_KERNEL_1, \
20222003
CONFIG_SERIAL_INIT_PRIORITY, \

0 commit comments

Comments
 (0)