linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard GENOUD <richard.genoud@bootlin.com>
To: "Mathieu Othacehe" <othacehe@gnu.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	linux-arm-kernel@lists.infradead.org,
	Jiri Slaby <jirislaby@kernel.org>,
	Claudiu Beznea <claudiu.beznea@tuxon.dev>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>
Subject: Re: [PATCH] tty: atmel_serial: use the correct RTS flag.
Date: Fri, 9 Aug 2024 18:45:51 +0200	[thread overview]
Message-ID: <f6266cc7-bdf2-413e-929e-1d1c0d7e2786@bootlin.com> (raw)
In-Reply-To: <20240808060637.19886-1-othacehe@gnu.org>

Hi,

Adding Ilpo to the list since he was the author.

Le 08/08/2024 à 08:06, Mathieu Othacehe a écrit :
> In RS485 mode, the RTS pin is driven high by hardware when the transmitter
> is operating. This behaviour cannot be changed. This means that the driver
> should claim that it supports SER_RS485_RTS_ON_SEND and not
> SER_RS485_RTS_AFTER_SEND.
> 
> Otherwise, when configuring the port with the SER_RS485_RTS_ON_SEND, one
> get the following warning:
> 
> kern.warning kernel: atmel_usart_serial atmel_usart_serial.2.auto:
> ttyS1 (1): invalid RTS setting, using RTS_AFTER_SEND instead
> 
> which is contradictory with what's really happening.
> 
> Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
> ---
>   drivers/tty/serial/atmel_serial.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 0a90964d6d107..09b246c9e389e 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -2514,7 +2514,7 @@ static const struct uart_ops atmel_pops = {
>   };
>   
>   static const struct serial_rs485 atmel_rs485_supported = {
> -	.flags = SER_RS485_ENABLED | SER_RS485_RTS_AFTER_SEND | SER_RS485_RX_DURING_TX,
> +	.flags = SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | SER_RS485_RX_DURING_TX,
>   	.delay_rts_before_send = 1,
>   	.delay_rts_after_send = 1,
>   };
Regards,
Ricahrd

  reply	other threads:[~2024-08-09 16:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-08  6:06 [PATCH] tty: atmel_serial: use the correct RTS flag Mathieu Othacehe
2024-08-09 16:45 ` Richard GENOUD [this message]
2024-08-13  7:59 ` Alexander Dahl
2024-08-13  8:17   ` Ilpo Järvinen
2024-08-22 14:06   ` Richard GENOUD

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=f6266cc7-bdf2-413e-929e-1d1c0d7e2786@bootlin.com \
    --to=richard.genoud@bootlin.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jirislaby@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=othacehe@gnu.org \
    /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).