On Tue, Sep 13, 2022 at 11:24:01AM +0300, Ilpo Järvinen wrote: > On Sun, 11 Sep 2022, Lukas Wunner wrote: > > The STM32 USART can control RS-485 Transmit Enable in hardware. Since > > commit 7df5081cbf5e ("serial: stm32: Add RS485 RTS GPIO control"), > > it can alternatively be controlled in software. That was done to allow > > RS-485 even if the RTS pin is unavailable because it's pinmuxed to a > > different function. > > > > However the commit neglected to deassert Transmit Enable upon invocation > > of the ->rs485_config() callback. Fix it. > > > > Avoid forward declarations by moving stm32_usart_tx_empty(), > > stm32_usart_rs485_rts_enable() and stm32_usart_rs485_rts_disable() > > further up in the driver. > > > > Fixes: 7df5081cbf5e ("serial: stm32: Add RS485 RTS GPIO control") > > Signed-off-by: Lukas Wunner <lukas@xxxxxxxxx> > > Cc: stable@xxxxxxxxxxxxxxx # v5.9+ > > Cc: Marek Vasut <marex@xxxxxxx> > > I'd prefer to have those plain function moves to be in a separate patch. Keeping that in a single patch eases backporting. Let's see which way Greg prefers. > Other than that, > > Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx> Thanks a lot! Lukas