Skip to content

Commit 4244f83

Browse files
ppetter1025gregkh
authored andcommitted
serial: 8520_mtk: Set RTS on shutdown for Rx in-band wakeup
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: 18c9d4a ("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>
1 parent 70d7f14 commit 4244f83

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

drivers/tty/serial/8250/8250_mtk.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,15 +209,19 @@ static int mtk8250_startup(struct uart_port *port)
209209

210210
static void mtk8250_shutdown(struct uart_port *port)
211211
{
212-
#ifdef CONFIG_SERIAL_8250_DMA
213212
struct uart_8250_port *up = up_to_u8250p(port);
214213
struct mtk8250_data *data = port->private_data;
214+
int irq = data->rx_wakeup_irq;
215215

216+
#ifdef CONFIG_SERIAL_8250_DMA
216217
if (up->dma)
217218
data->rx_status = DMA_RX_SHUTDOWN;
218219
#endif
219220

220-
return serial8250_do_shutdown(port);
221+
serial8250_do_shutdown(port);
222+
223+
if (irq >= 0)
224+
serial8250_do_set_mctrl(&up->port, TIOCM_RTS);
221225
}
222226

223227
static void mtk8250_disable_intrs(struct uart_8250_port *up, int mask)

0 commit comments

Comments
 (0)