]> Git Repo - linux.git/commit
serial: 8250: Handle UART without interrupt on TEMT using em485
authorEric Tremblay <[email protected]>
Wed, 30 Mar 2022 10:46:40 +0000 (12:46 +0200)
committerGreg Kroah-Hartman <[email protected]>
Fri, 15 Apr 2022 09:37:27 +0000 (11:37 +0200)
commitf6f586102add59d57bcc6eea06fdeaae11bb17a1
treed04ec5638a815f6002841e276acb9f6c46c0a1ef
parent0e0fd55719fa081de6f9e5d9e6cef48efb04d34a
serial: 8250: Handle UART without interrupt on TEMT using em485

Introduce the UART_CAP_NOTEMT capability. The capability indicates that
the UART doesn't have an interrupt available on TEMT.

In the case where the device does not support it, we calculate the
maximum time it could take for the transmitter to empty the
shift register. When we get in the situation where we get the
THRE interrupt, we check if the TEMT bit is set. If it's not, we start
the a timer and recall __stop_tx() after the delay.

The transmit sequence is a bit modified when the capability is set. The
new timer is used between the last interrupt(THRE) and a potential
stop_tx timer.

Signed-off-by: Giulio Benetti <[email protected]>
[moved to use added UART_CAP_TEMT]
Signed-off-by: Heiko Stuebner <[email protected]>
[moved to use added UART_CAP_NOTEMT, improve timeout]
Signed-off-by: Eric Tremblay <[email protected]>
[rebased to v5.17, making use of tty_get_frame_size]
Signed-off-by: Uwe Kleine-König <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/tty/serial/8250/8250.h
drivers/tty/serial/8250/8250_port.c
include/linux/serial_8250.h
This page took 0.058432 seconds and 4 git commands to generate.