serial: 8250_omap: Use force_suspend and resume for system suspend
authorTony Lindgren <tony@atomide.com>
Wed, 14 Jun 2023 04:59:19 +0000 (07:59 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Jul 2023 14:21:56 +0000 (16:21 +0200)
commit852659fe834ab720de07658f2bcd1332805bb752
tree4213e13ecd58a3e4bb76536cda64ca0ec3eb9e18
parente34817340025e6cc4edaef6fa5eace09d42917c9
serial: 8250_omap: Use force_suspend and resume for system suspend

[ Upstream commit 20a41a62618df85f3a2981008edec5cadd785e0a ]

We should not rely on autosuspend timeout for system suspend. Instead,
let's use force_suspend and force_resume functions. Otherwise the serial
port controller device may not be idled on suspend.

As we are doing a register write on suspend to configure the serial port,
we still need to runtime PM resume the port on suspend.

While at it, let's switch to pm_runtime_resume_and_get() and check for
errors returned. And let's add the missing line break before return to the
suspend function while at it.

Fixes: 09d8b2bdbc5c ("serial: 8250: omap: Provide ability to enable/disable UART as wakeup source")
Signed-off-by: Tony Lindgren <tony@atomide.com>
Tested-by: Dhruva Gole <d-gole@ti.com>
Message-ID: <20230614045922.4798-1-tony@atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/8250/8250_omap.c