Thread (5 messages) 5 messages, 1 author, 2014-09-06
STALE4313d

[PATCH 2/4] tty: vt8500_serial: add missing support for RTS setting

From: Alexey Charkov <alchark@gmail.com>
Date: 2014-09-06 17:22:28
Also in: linux-arm-kernel, linux-serial, lkml
Subsystem: arm/vt8500 arm architecture, the rest, tty layer and serial drivers · Maintainers: Alexey Charkov, Krzysztof Kozlowski, Linus Torvalds, Greg Kroah-Hartman, Jiri Slaby

Signed-off-by: Alexey Charkov <alchark@gmail.com>
---
 drivers/tty/serial/vt8500_serial.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/drivers/tty/serial/vt8500_serial.c b/drivers/tty/serial/vt8500_serial.c
index f225719..47e74f9 100644
--- a/drivers/tty/serial/vt8500_serial.c
+++ b/drivers/tty/serial/vt8500_serial.c
@@ -291,6 +291,14 @@ static unsigned int vt8500_get_mctrl(struct uart_port *port)
 
 static void vt8500_set_mctrl(struct uart_port *port, unsigned int mctrl)
 {
+	unsigned int lcr = vt8500_read(port, VT8500_URLCR);
+
+	if (mctrl & TIOCM_RTS)
+		lcr |= VT8500_RTS;
+	else
+		lcr &= ~VT8500_RTS;
+
+	vt8500_write(port, lcr, VT8500_URLCR);
 }
 
 static void vt8500_break_ctl(struct uart_port *port, int break_ctl)
-- 
2.0.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help