From: Andy Shevchenko <andriy.shevche...@linux.intel.com> Backport: - Upstream-Status: Pending. - Backport fix. [https://bitbucket.org/andy-shev/linux/commits/37170b7763ab43c6f49543bc69438cab256a90f6?at=master]
Enable runtime PM for all ports unconditionally. Set autosuspend time to infinity (-1) to avoid port being shutdown when using, for example, as a serial console since there is no means to resume it back. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> Signed-off-by: Nilesh Bacchewar <nilesh.bacche...@intel.com> --- drivers/tty/serial/8250/8250_dw.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index a5d319e..4ffd160 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -204,18 +204,6 @@ static int dw8250_handle_irq(struct uart_port *p) return 0; } -static void -dw8250_do_pm(struct uart_port *port, unsigned int state, unsigned int old) -{ - if (!state) - pm_runtime_get_sync(port->dev); - - serial8250_do_pm(port, state, old); - - if (state) - pm_runtime_put_sync_suspend(port->dev); -} - static void dw8250_set_termios(struct uart_port *p, struct ktermios *termios, struct ktermios *old) { @@ -357,7 +345,6 @@ static int dw8250_probe(struct platform_device *pdev) p->mapbase = regs->start; p->irq = irq; p->handle_irq = dw8250_handle_irq; - p->pm = dw8250_do_pm; p->type = PORT_8250; p->flags = UPF_SHARE_IRQ | UPF_FIXED_PORT; p->dev = &pdev->dev; @@ -486,6 +473,9 @@ static int dw8250_probe(struct platform_device *pdev) platform_set_drvdata(pdev, data); + pm_runtime_use_autosuspend(&pdev->dev); + pm_runtime_set_autosuspend_delay(&pdev->dev, -1); + pm_runtime_set_active(&pdev->dev); pm_runtime_enable(&pdev->dev); -- 1.9.1 -- _______________________________________________ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto