serial: imx: set_termios(): do not enable autoRTS if RTS is unset
authorSergey Organov <sorganov@gmail.com>
Fri, 26 Jul 2019 18:52:39 +0000 (21:52 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Sep 2019 10:43:46 +0000 (12:43 +0200)
commita25aee902e666e8cc41e33754f13c69a979dd67f
tree14c9e0ed6c3b1bd9973d43c5494530987515368b
parent72d819612ae0b080ba141a6959cea138ddc1e330
serial: imx: set_termios(): do not enable autoRTS if RTS is unset

Don't let receiver hardware automatically control RTS output if it
was requested to be inactive.

To ensure this, set_termios() shouldn't set UCR2_CTSC bit if UCR2_CTS
(=TIOCM_RTS) is cleared. Added corresponding check in imx_uart_rts_auto()
to fix this.

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Sergey Organov <sorganov@gmail.com>
Link: https://lore.kernel.org/r/1564167161-3972-2-git-send-email-sorganov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c