WSL2-Linux-Kernel/drivers/tty
Lukas Wunner db3f8da033 serial: stm32: Deassert Transmit Enable on ->rs485_config()
[ Upstream commit adafbbf689 ]

The STM32 USART can control RS-485 Transmit Enable in hardware.  Since
commit 7df5081cbf ("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: 7df5081cbf ("serial: stm32: Add RS485 RTS GPIO control")
Cc: stable@vger.kernel.org # v5.9+
Cc: Marek Vasut <marex@denx.de>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Link: https://lore.kernel.org/r/6059eab35dba394468335ef640df8b0050fd9dbd.1662886616.git.lukas@wunner.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:28:45 +01:00
..
hvc tty: hvc: fix return value of __setup handler 2022-04-08 14:23:50 +02:00
ipwireless
serdev TTY / Serial patches for 5.15-rc1 2021-09-01 09:51:16 -07:00
serial serial: stm32: Deassert Transmit Enable on ->rs485_config() 2022-12-08 11:28:45 +01:00
vt vt: Clear selection before changing the font 2022-09-08 12:28:03 +02:00
Kconfig
Makefile
amiserial.c
ehv_bytechan.c
goldfish.c tty: drivers/tty/, stop using tty_schedule_flip() 2022-07-29 17:25:31 +02:00
mips_ejtag_fdc.c
moxa.c tty: drivers/tty/, stop using tty_schedule_flip() 2022-07-29 17:25:31 +02:00
moxa.h
mxser.c mxser: fix xmit_buf leak in activate when LSR == 0xff 2022-04-08 14:23:43 +02:00
n_gsm.c tty: n_gsm: fix sleep-in-atomic-context bug in gsm_control_send 2022-11-26 09:24:35 +01:00
n_hdlc.c tty: n_hdlc: make n_hdlc_tty_wakeup() asynchronous 2021-12-22 09:32:45 +01:00
n_null.c
n_tty.c tty: n_tty: Restore EOF push handling behavior 2022-06-14 18:36:03 +02:00
nozomi.c
pty.c tty: use new tty_insert_flip_string_and_push_buffer() in pty_write() 2022-07-29 17:25:32 +02:00
synclink_gt.c tty: synclink_gt: Fix null-pointer-dereference in slgt_clean() 2022-06-14 18:36:20 +02:00
sysrq.c sysrq: do not omit current cpu when showing backtrace of all active CPUs 2022-06-14 18:36:21 +02:00
tty.h tty: use new tty_insert_flip_string_and_push_buffer() in pty_write() 2022-07-29 17:25:32 +02:00
tty_audit.c
tty_baudrate.c
tty_buffer.c tty: use new tty_insert_flip_string_and_push_buffer() in pty_write() 2022-07-29 17:25:32 +02:00
tty_io.c
tty_ioctl.c
tty_jobctrl.c
tty_ldisc.c tty: unexport tty_ldisc_release 2021-09-14 11:18:47 +02:00
tty_ldsem.c
tty_mutex.c
tty_port.c
ttynull.c
vcc.c