]> git.baikalelectronics.ru Git - kernel.git/commit
serial: imx: Fix the CTS_B polarity in RS485 mode
authorFabio Estevam <fabio.estevam@nxp.com>
Mon, 30 Jan 2017 11:12:12 +0000 (09:12 -0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Jan 2017 09:54:58 +0000 (10:54 +0100)
commit4a5723e2cac8211ac4e5385b6e0fcb03a5bcf669
tree1c4e2caac30b566fa6498500909cb2ea148717ba
parent360980242c53678a590e221db76c8f4ae814fdf4
serial: imx: Fix the CTS_B polarity in RS485 mode

When userspace passes the SER_RS485_RTS_ON_SEND flag it means that the
CTS_B pin should go to logic level high before the transmission begins.

CTS_B goes to logic level high when both CTSC and CTS bits are cleared.

When userspace passes the SER_RS485_RTS_AFTER_SEND flag it means that the
CTS_B pin should go to logic level low after the transmission finishes.

CTS_B goes to logic level low when CTSC bit is cleared and CTS bit is set.

So fix the CTS_B polarity logic.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c