USB: serial: ti_usb_3410_5052: drop drain delay for 3410
authorJohan Hovold <johan@kernel.org>
Mon, 12 Apr 2021 09:38:15 +0000 (11:38 +0200)
committerJohan Hovold <johan@kernel.org>
Tue, 13 Apr 2021 16:19:34 +0000 (18:19 +0200)
commitbd49224a2ecf19bf5ce9128d8175fa69eeb952b5
treed7e7a1209fd518fb42737b5704dcb7818de6af7b
parentc505b8b2ef274ce60a79f18a33bf23efd17a04de
USB: serial: ti_usb_3410_5052: drop drain delay for 3410

Unlike the TUSB5052, the TUSB3410 has an LSR TEMT bit to tell if both
the transmitter data and shift registers are empty.

Make sure to check also the shift register on TUSB3410 when waiting for
the transmit buffer to drain during close and drop the time-based
one-char delay which is otherwise needed (e.g. 90 ms at 110 bps).

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/ti_usb_3410_5052.c