linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: Shenwei Wang <shenwei.wang@nxp.com>, gregkh@linuxfoundation.org
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	NXP Linux Team <linux-imx@nxp.com>,
	Nicolas Diaz <nicolas.diaz@nxp.com>
Subject: Re: [PATCH 1/1] serial: fsl_lpuart: RS485 RTS polariy is inverse
Date: Thu, 4 Aug 2022 08:51:10 +0200	[thread overview]
Message-ID: <c63877d8-4df2-778e-7e3d-2fdd0e14d4e1@kernel.org> (raw)
In-Reply-To: <20220802163854.1055323-1-shenwei.wang@nxp.com>

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

  reply	other threads:[~2022-08-04  6:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-02 16:38 [PATCH 1/1] serial: fsl_lpuart: RS485 RTS polariy is inverse Shenwei Wang
2022-08-04  6:51 ` Jiri Slaby [this message]
2022-08-04 14:35   ` [EXT] " Shenwei Wang
2022-08-05  6:23     ` Jiri Slaby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c63877d8-4df2-778e-7e3d-2fdd0e14d4e1@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=nicolas.diaz@nxp.com \
    --cc=shenwei.wang@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).