[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1574687731-21563-3-git-send-email-shubhrajyoti.datta@gmail.com>
Date: Mon, 25 Nov 2019 18:45:31 +0530
From: shubhrajyoti.datta@...il.com
To: linux-kernel@...r.kernel.org
Cc: michal.simek@...inx.com, gregkh@...uxfoundation.org, arnd@...db.de,
Maarten Brock <m.brock@...mierlo.com>,
Shubhrajyoti Datta <shubhrajyoti.datta@...inx.com>
Subject: [PATCHv2 3/3] serial: xilinx_uartps: set_mctrl sets RTS and DTR
From: Maarten Brock <m.brock@...mierlo.com>
set_mctrl now sets RTS and DTR.
Signed-off-by: Maarten Brock <m.brock@...mierlo.com>
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@...inx.com>
---
drivers/tty/serial/xilinx_uartps.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index e82f8db..b4fd550 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -1059,6 +1059,10 @@ static void cdns_uart_set_mctrl(struct uart_port *port, unsigned int mctrl)
val &= ~(CDNS_UART_MODEMCR_RTS | CDNS_UART_MODEMCR_DTR);
mode_reg &= ~CDNS_UART_MR_CHMODE_MASK;
+ if (mctrl & TIOCM_RTS)
+ val |= CDNS_UART_MODEMCR_RTS;
+ if (mctrl & TIOCM_DTR)
+ val |= CDNS_UART_MODEMCR_DTR;
if (mctrl & TIOCM_LOOP)
mode_reg |= CDNS_UART_MR_CHMODE_L_LOOP;
else
--
2.1.1
Powered by blists - more mailing lists