tty: vt8500_serial: add missing support for RTS setting
authorAlexey Charkov <alchark@gmail.com>
Sat, 6 Sep 2014 17:21:13 +0000 (21:21 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Sep 2014 23:29:36 +0000 (16:29 -0700)
Signed-off-by: Alexey Charkov <alchark@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/vt8500_serial.c

index f2257191518521b37718390cb4f277a09dec4008..47e74f9b01aedc9e8ff0bf876f60e9daecc584d9 100644 (file)
@@ -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)