* [PATCH] serial: ar933x: Deassert Transmit Enable on ->rs485_config()
@ 2022-09-11 9:12 Lukas Wunner
2022-09-13 8:22 ` Ilpo Järvinen
0 siblings, 1 reply; 2+ messages in thread
From: Lukas Wunner @ 2022-09-11 9:12 UTC (permalink / raw)
To: Greg Kroah-Hartman, Daniel Golle
Cc: Jiri Slaby, linux-serial, Lino Sanfilippo, Ilpo Jarvinen
The ar933x_uart driver neglects to deassert Transmit Enable when
->rs485_config() is invoked. Fix it.
Fixes: 9be1064fe524 ("serial: ar933x_uart: add RS485 support")
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Cc: stable@vger.kernel.org # v5.7+
Cc: Daniel Golle <daniel@makrotopia.org>
---
drivers/tty/serial/ar933x_uart.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/tty/serial/ar933x_uart.c b/drivers/tty/serial/ar933x_uart.c
index 0a4020dba165..925484a42c82 100644
--- a/drivers/tty/serial/ar933x_uart.c
+++ b/drivers/tty/serial/ar933x_uart.c
@@ -583,6 +583,13 @@ static const struct uart_ops ar933x_uart_ops = {
static int ar933x_config_rs485(struct uart_port *port, struct ktermios *termios,
struct serial_rs485 *rs485conf)
{
+ struct ar933x_uart_port *up =
+ container_of(port, struct ar933x_uart_port, port);
+
+ if (port->rs485.flags & SER_RS485_ENABLED)
+ gpiod_set_value(up->rts_gpiod,
+ !!(rs485conf->flags & SER_RS485_RTS_AFTER_SEND));
+
return 0;
}
--
2.36.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] serial: ar933x: Deassert Transmit Enable on ->rs485_config()
2022-09-11 9:12 [PATCH] serial: ar933x: Deassert Transmit Enable on ->rs485_config() Lukas Wunner
@ 2022-09-13 8:22 ` Ilpo Järvinen
0 siblings, 0 replies; 2+ messages in thread
From: Ilpo Järvinen @ 2022-09-13 8:22 UTC (permalink / raw)
To: Lukas Wunner
Cc: Greg Kroah-Hartman, Daniel Golle, Jiri Slaby, linux-serial,
Lino Sanfilippo
[-- Attachment #1: Type: text/plain, Size: 414 bytes --]
On Sun, 11 Sep 2022, Lukas Wunner wrote:
> The ar933x_uart driver neglects to deassert Transmit Enable when
> ->rs485_config() is invoked. Fix it.
>
> Fixes: 9be1064fe524 ("serial: ar933x_uart: add RS485 support")
> Signed-off-by: Lukas Wunner <lukas@wunner.de>
> Cc: stable@vger.kernel.org # v5.7+
> Cc: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
--
i.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-13 8:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-11 9:12 [PATCH] serial: ar933x: Deassert Transmit Enable on ->rs485_config() Lukas Wunner
2022-09-13 8:22 ` Ilpo Järvinen
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).