mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-13 20:59:37 +02:00
serial: 8520_mtk: Set RTS on shutdown for Rx in-band wakeup
commit4244f830a5
upstream. When Rx in-band wakeup is enabled, set RTS to true in mtk8250_shutdown() so the connected device can still send message and trigger IRQ when the system is suspended. Fixes:18c9d4a3c2
("serial: When UART is suspended, set RTS to false") Cc: stable <stable@kernel.org> Signed-off-by: Pin-yen Lin <treapking@chromium.org> Link: https://lore.kernel.org/r/20240424130619.2924456-1-treapking@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7e16930d46
commit
e4a1d0aa0d
|
@ -209,15 +209,19 @@ static int mtk8250_startup(struct uart_port *port)
|
||||||
|
|
||||||
static void mtk8250_shutdown(struct uart_port *port)
|
static void mtk8250_shutdown(struct uart_port *port)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_SERIAL_8250_DMA
|
|
||||||
struct uart_8250_port *up = up_to_u8250p(port);
|
struct uart_8250_port *up = up_to_u8250p(port);
|
||||||
struct mtk8250_data *data = port->private_data;
|
struct mtk8250_data *data = port->private_data;
|
||||||
|
int irq = data->rx_wakeup_irq;
|
||||||
|
|
||||||
|
#ifdef CONFIG_SERIAL_8250_DMA
|
||||||
if (up->dma)
|
if (up->dma)
|
||||||
data->rx_status = DMA_RX_SHUTDOWN;
|
data->rx_status = DMA_RX_SHUTDOWN;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return serial8250_do_shutdown(port);
|
serial8250_do_shutdown(port);
|
||||||
|
|
||||||
|
if (irq >= 0)
|
||||||
|
serial8250_do_set_mctrl(&up->port, TIOCM_RTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mtk8250_disable_intrs(struct uart_8250_port *up, int mask)
|
static void mtk8250_disable_intrs(struct uart_8250_port *up, int mask)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user