serial: ar933x: Deassert Transmit Enable on ->rs485_config()
commit 3a939433ddc1bab98be028903aaa286e5e7461d7 upstream. The ar933x_uart driver neglects to deassert Transmit Enable when ->rs485_config() is invoked. Fix it. Fixes: 9be1064fe524 ("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:
parent
21d65b3516
commit
0c9c1306d6
@ -591,6 +591,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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user