Skip to contentSkip to conversation

FAILED: patch "[PATCH] serial: ar933x: Deassert Transmit Enable on ->rs485_config()" failed to apply to 5.19-stable tree

PATCH [email protected] 1 participant 1 message Oct 16, 2022

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 5.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

Possible dependencies:

3a939433ddc1 ("serial: ar933x: Deassert Transmit Enable on ->rs485_config()") 184842622c97 ("serial: ar933x: Remove superfluous code in ar933x_config_rs485()")

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 3a939433ddc1bab98be028903aaa286e5e7461d7 Mon Sep 17 00:00:00 2001
From: Lukas Wunner <[email protected]>
Date: Sun, 11 Sep 2022 11:12:15 +0200
Subject: [PATCH] serial: ar933x: Deassert Transmit Enable on ->rs485_config()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The ar933x_uart driver neglects to deassert Transmit Enable when ->rs485_config() is invoked. Fix it.

drivers/tty/serial/ar933x_uart.c +7 -0
index 0a4020dba165..925484a42c82 100644
@@ -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;
 }