Skip to content

Commit c9f6613

Browse files
Mathieu Othacehegregkh
authored andcommitted
tty: atmel_serial: use the correct RTS flag.
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> Cc: stable <stable@kernel.org> Tested-by: Alexander Dahl <ada@thorsis.com> Fixes: af47c49 ("serial: atmel: Fill in rs485_supported") Link: https://lore.kernel.org/r/20240808060637.19886-1-othacehe@gnu.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 7258fdd commit c9f6613

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/serial/atmel_serial.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2514,7 +2514,7 @@ static const struct uart_ops atmel_pops = {
25142514
};
25152515

25162516
static const struct serial_rs485 atmel_rs485_supported = {
2517-
.flags = SER_RS485_ENABLED | SER_RS485_RTS_AFTER_SEND | SER_RS485_RX_DURING_TX,
2517+
.flags = SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | SER_RS485_RX_DURING_TX,
25182518
.delay_rts_before_send = 1,
25192519
.delay_rts_after_send = 1,
25202520
};

0 commit comments

Comments
 (0)