提交 3957b950 编写于 作者: S Shenwei Wang 提交者: Greg Kroah-Hartman

serial: fsl_lpuart: fix RS485 RTS polariy inverse issue

The previous 'commit 846651ec ("serial: fsl_lpuart: RS485 RTS
polariy is inverse")' only fixed the inverse issue on lpuart 8bit
platforms.

This is a follow-up patch to fix the RS485 polarity inverse
issue on lpuart 32bit platforms.

Fixes: 03895cf4 ("tty: serial: fsl_lpuart: Add support for RS-485")
Reported-by: NSherry Sun <sherry.sun@nxp.com>
Signed-off-by: NShenwei Wang <shenwei.wang@nxp.com>
Link: https://lore.kernel.org/r/20230207162420.3647904-1-shenwei.wang@nxp.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 f6b2ce79
...@@ -1413,9 +1413,9 @@ static int lpuart32_config_rs485(struct uart_port *port, struct ktermios *termio ...@@ -1413,9 +1413,9 @@ static int lpuart32_config_rs485(struct uart_port *port, struct ktermios *termio
* Note: UART is assumed to be active high. * Note: UART is assumed to be active high.
*/ */
if (rs485->flags & SER_RS485_RTS_ON_SEND) if (rs485->flags & SER_RS485_RTS_ON_SEND)
modem &= ~UARTMODEM_TXRTSPOL;
else if (rs485->flags & SER_RS485_RTS_AFTER_SEND)
modem |= UARTMODEM_TXRTSPOL; modem |= UARTMODEM_TXRTSPOL;
else if (rs485->flags & SER_RS485_RTS_AFTER_SEND)
modem &= ~UARTMODEM_TXRTSPOL;
} }
lpuart32_write(&sport->port, modem, UARTMODIR); lpuart32_write(&sport->port, modem, UARTMODIR);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册