From: Alexey Charkov Date: Sat, 6 Sep 2014 17:21:13 +0000 (+0400) Subject: tty: vt8500_serial: add missing support for RTS setting X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8c986d3e20bcbf33c680130a5798f25429c53e31;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git tty: vt8500_serial: add missing support for RTS setting Signed-off-by: Alexey Charkov Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/vt8500_serial.c b/drivers/tty/serial/vt8500_serial.c index f22571915185..47e74f9b01ae 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)