From d1859c3b268316825c1d4ea822630dd2950d4f11 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 5 Sep 2022 17:46:32 +0200 Subject: [PATCH] 5.18-stable patches added patches: serial-fsl_lpuart-rs485-rts-polariy-is-inverse.patch series --- ..._lpuart-rs485-rts-polariy-is-inverse.patch | 39 +++++++++++++++++++ queue-5.18/series | 1 + 2 files changed, 40 insertions(+) create mode 100644 queue-5.18/serial-fsl_lpuart-rs485-rts-polariy-is-inverse.patch create mode 100644 queue-5.18/series diff --git a/queue-5.18/serial-fsl_lpuart-rs485-rts-polariy-is-inverse.patch b/queue-5.18/serial-fsl_lpuart-rs485-rts-polariy-is-inverse.patch new file mode 100644 index 00000000000..9d72eaeb06d --- /dev/null +++ b/queue-5.18/serial-fsl_lpuart-rs485-rts-polariy-is-inverse.patch @@ -0,0 +1,39 @@ +From 846651eca073e2e02e37490a4a52752415d84781 Mon Sep 17 00:00:00 2001 +From: Shenwei Wang +Date: Fri, 5 Aug 2022 09:45:29 -0500 +Subject: serial: fsl_lpuart: RS485 RTS polariy is inverse + +From: Shenwei Wang + +commit 846651eca073e2e02e37490a4a52752415d84781 upstream. + +The setting of RS485 RTS polarity is inverse in the current driver. + +When the property of 'rs485-rts-active-low' is enabled in the dts node, +the RTS signal should be LOW during sending. Otherwise, if there is no +such a property, the RTS should be HIGH during sending. + +Fixes: 03895cf41d18 ("tty: serial: fsl_lpuart: Add support for RS-485") +Cc: stable +Signed-off-by: Nicolas Diaz +Signed-off-by: Shenwei Wang +Link: https://lore.kernel.org/r/20220805144529.604856-1-shenwei.wang@nxp.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/tty/serial/fsl_lpuart.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/tty/serial/fsl_lpuart.c ++++ b/drivers/tty/serial/fsl_lpuart.c +@@ -1394,9 +1394,9 @@ static int lpuart_config_rs485(struct ua + * Note: UART is assumed to be active high. + */ + if (rs485->flags & SER_RS485_RTS_ON_SEND) +- modem &= ~UARTMODEM_TXRTSPOL; +- else if (rs485->flags & SER_RS485_RTS_AFTER_SEND) + modem |= UARTMODEM_TXRTSPOL; ++ else if (rs485->flags & SER_RS485_RTS_AFTER_SEND) ++ modem &= ~UARTMODEM_TXRTSPOL; + } + + /* Store the new configuration */ diff --git a/queue-5.18/series b/queue-5.18/series new file mode 100644 index 00000000000..b19d9f0a312 --- /dev/null +++ b/queue-5.18/series @@ -0,0 +1 @@ +serial-fsl_lpuart-rs485-rts-polariy-is-inverse.patch -- 2.47.3