]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
serial: stm32: Use TC interrupt to deassert GPIO RTS in RS485 mode
authorMarek Vasut <marex@denx.de>
Sat, 30 Apr 2022 16:28:45 +0000 (18:28 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 14 Dec 2022 13:02:52 +0000 (14:02 +0100)
commitb8ba0d6ba45fb74a4475e9df1a0327329767f4ae
tree6ba4ec87c2f1246143b6c62f2c453233016f6322
parentd3cedc91c875cbbf781f0042d31d4612d26ac180
serial: stm32: Use TC interrupt to deassert GPIO RTS in RS485 mode

[ Upstream commit d7c76716169ddc37cf6316ff381d34ea807fbfd7 ]

In case the RS485 mode is emulated using GPIO RTS, use the TC interrupt
to deassert the GPIO RTS, otherwise the GPIO RTS stays asserted after a
transmission ended and the RS485 cannot work.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Erwan Le Ray <erwan.leray@foss.st.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jean Philippe Romain <jean-philippe.romain@foss.st.com>
Cc: Valentin Caron <valentin.caron@foss.st.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-stm32@st-md-mailman.stormreply.com
To: linux-serial@vger.kernel.org
Link: https://lore.kernel.org/r/20220430162845.244655-2-marex@denx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 45f628f4fd816f4843f6860996fcaa2b461165d1)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
drivers/tty/serial/stm32-usart.c
drivers/tty/serial/stm32-usart.h