serial: ar933x: Deassert Transmit Enable on ->rs485_config()

commit 3a939433dd upstream.

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

Fixes: 9be1064fe5 ("serial: ar933x_uart: add RS485 support")
Cc: stable@vger.kernel.org # v5.7+
Cc: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Ilpo JÀrvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Lukas Wunner
2022-11-05 09:46:40 -04:00
committed by Greg Kroah-Hartman
parent e6da7808c9
commit 028fcabd8a

View File

@@ -593,6 +593,11 @@ static int ar933x_config_rs485(struct uart_port *port,
dev_err(port->dev, "RS485 needs rts-gpio\n");
return 1;
}
if (rs485conf->flags & SER_RS485_ENABLED)
gpiod_set_value(up->rts_gpiod,
!!(rs485conf->flags & SER_RS485_RTS_AFTER_SEND));
port->rs485 = *rs485conf;
return 0;
}