lkml.org 
[lkml]   [2022]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/1] serial: fsl_lpuart: RS485 RTS polariy is inverse
From
On 02. 08. 22, 18:38, Shenwei Wang wrote:
> 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.

What commit this fixes? I.e. I am missing a Fixes tag below.

> Signed-off-by: Nicolas Diaz <nicolas.diaz@nxp.com>
> Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
> ---
> drivers/tty/serial/fsl_lpuart.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
> index afa0f941c862f..abc3a3674bc39 100644
> --- a/drivers/tty/serial/fsl_lpuart.c
> +++ b/drivers/tty/serial/fsl_lpuart.c
> @@ -1394,9 +1394,9 @@ static int lpuart_config_rs485(struct uart_port *port, struct ktermios *termios,
> * 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;
> }
>
> writeb(modem, sport->port.membase + UARTMODEM);

thanks,
--
js
suse labs

\
 
 \ /
  Last update: 2022-08-04 08:52    [W:0.059 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site