Skip to content

Revert "driver: serial: uart_ns16550: Add pm support for uart_ns16550 driver" #93568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 2 additions & 21 deletions drivers/serial/uart_ns16550.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <zephyr/drivers/uart.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/pm/policy.h>
#include <zephyr/pm/device.h>
#include <zephyr/sys/sys_io.h>
#include <zephyr/spinlock.h>
#include <zephyr/irq.h>
Expand Down Expand Up @@ -733,22 +732,6 @@ static int uart_ns16550_configure(const struct device *dev,
return ret;
};

__maybe_unused static int uart_ns16550_pm_action(const struct device *dev,
enum pm_device_action action)
{
struct uart_ns16550_dev_data *data = dev->data;
struct uart_config *uart_cfg = &data->uart_config;

switch (action) {
case PM_DEVICE_ACTION_RESUME:
return uart_ns16550_configure(dev, uart_cfg);
case PM_DEVICE_ACTION_SUSPEND:
return 0;
default:
return -ENOTSUP;
}
}

#ifdef CONFIG_UART_USE_RUNTIME_CONFIGURE
static int uart_ns16550_config_get(const struct device *dev,
struct uart_config *cfg)
Expand Down Expand Up @@ -1996,8 +1979,7 @@ static DEVICE_API(uart, uart_ns16550_driver_api) = {
static struct uart_ns16550_dev_data uart_ns16550_dev_data_##n = { \
UART_NS16550_COMMON_DEV_DATA_INITIALIZER(n) \
}; \
PM_DEVICE_DT_INST_DEFINE(n, uart_ns16550_pm_action); \
DEVICE_DT_INST_DEFINE(n, uart_ns16550_init, PM_DEVICE_DT_INST_GET(n), \
DEVICE_DT_INST_DEFINE(n, uart_ns16550_init, NULL, \
&uart_ns16550_dev_data_##n, &uart_ns16550_dev_cfg_##n, \
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \
&uart_ns16550_driver_api); \
Expand All @@ -2015,8 +1997,7 @@ static DEVICE_API(uart, uart_ns16550_driver_api) = {
static struct uart_ns16550_dev_data uart_ns16550_dev_data_##n = { \
UART_NS16550_COMMON_DEV_DATA_INITIALIZER(n) \
}; \
PM_DEVICE_DT_INST_DEFINE(n, uart_ns16550_pm_action); \
DEVICE_DT_INST_DEFINE(n, uart_ns16550_init, PM_DEVICE_DT_INST_GET(n), \
DEVICE_DT_INST_DEFINE(n, uart_ns16550_init, NULL, \
&uart_ns16550_dev_data_##n, &uart_ns16550_dev_cfg_##n, \
PRE_KERNEL_1, \
CONFIG_SERIAL_INIT_PRIORITY, \
Expand Down