[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241008-8250-omap-no-console-suspend-v1-2-e7f0365c02f0@bootlin.com>
Date: Tue, 08 Oct 2024 11:34:17 +0200
From: Thomas Richard <thomas.richard@...tlin.com>
To: Nishanth Menon <nm@...com>, Tero Kristo <kristo@...nel.org>,
Santosh Shilimkar <ssantosh@...nel.org>,
Ulf Hansson <ulf.hansson@...aro.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>
Cc: linux-arm-kernel@...ts.infradead.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org, u-kumar1@...com,
tony@...mide.com, khilman@...nel.org, gregory.clement@...tlin.com,
thomas.petazzoni@...tlin.com, theo.lebrun@...tlin.com,
richard.genoud@...tlin.com, Thomas Richard <thomas.richard@...tlin.com>
Subject: [PATCH 2/2] serial: 8250_omap: mark the serial as on the wakeup
path if no_console_suspend
If the console suspend is disabled, mark the serial as on the wakeup path
to keep its PM domain powered on.
Suggested-by: Théo Lebrun <theo.lebrun@...tlin.com>
Signed-off-by: Thomas Richard <thomas.richard@...tlin.com>
---
drivers/tty/serial/8250/8250_omap.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index 88b58f44e4e9..6764fe2f9cad 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -1660,8 +1660,12 @@ static int omap8250_suspend(struct device *dev)
if (!device_may_wakeup(dev))
priv->wer = 0;
serial_out(up, UART_OMAP_WER, priv->wer);
- if (uart_console(&up->port) && console_suspend_enabled)
- err = pm_runtime_force_suspend(dev);
+ if (uart_console(&up->port)) {
+ if (console_suspend_enabled)
+ err = pm_runtime_force_suspend(dev);
+ else
+ device_set_wakeup_path(dev);
+ }
flush_work(&priv->qos_work);
return err;
--
2.39.5
Powered by blists - more mailing lists