[PATCH] fixup! serial: imx: add support for half duplex rs485

From: Uwe Kleine-KÃnig
Date: Tue Mar 10 2015 - 04:32:57 EST


---
drivers/tty/serial/imx.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index ddfb672d0152..e9102eba49c4 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1298,7 +1298,7 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios,
if (sport->have_rtscts) {
ucr2 &= ~UCR2_IRTS;

- if (port->rs485.flags & SER_RS485_ENABLED)
+ if (port->rs485.flags & SER_RS485_ENABLED) {
/*
* RTS is mandatory for rs485 operation, so keep
* it under manual control and keep transmitter
@@ -1307,8 +1307,9 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios,
if (!(port->rs485.flags &
SER_RS485_RTS_AFTER_SEND))
ucr2 |= UCR2_CTS;
- else
+ } else {
ucr2 |= UCR2_CTSC;
+ }

} else {
termios->c_cflag &= ~CRTSCTS;
--
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/