mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
serial: ar933x: Deassert Transmit Enable on ->rs485_config()
commit3a939433ddupstream. 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:
committed by
Greg Kroah-Hartman
parent
e6da7808c9
commit
028fcabd8a
@@ -593,6 +593,11 @@ static int ar933x_config_rs485(struct uart_port *port,
|
|||||||
dev_err(port->dev, "RS485 needs rts-gpio\n");
|
dev_err(port->dev, "RS485 needs rts-gpio\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rs485conf->flags & SER_RS485_ENABLED)
|
||||||
|
gpiod_set_value(up->rts_gpiod,
|
||||||
|
!!(rs485conf->flags & SER_RS485_RTS_AFTER_SEND));
|
||||||
|
|
||||||
port->rs485 = *rs485conf;
|
port->rs485 = *rs485conf;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user