USB: serial: cp210x: fix RTS handling
authorJohan Hovold <johan@kernel.org>
Mon, 25 Jan 2021 13:48:16 +0000 (14:48 +0100)
committerJohan Hovold <johan@kernel.org>
Mon, 1 Feb 2021 09:03:55 +0000 (10:03 +0100)
commitcf00ead0bde8e47ccd3aa8a4e51cfa59bbf5e055
treebf35b76a1e8c17d416d06a192b3f6f34a6aad178
parent6b667274f41a0269a8b493079fcacd4f55183f60
USB: serial: cp210x: fix RTS handling

Clearing TIOCM_RTS should always deassert RTS and setting the same bit
should enable auto-RTS if hardware flow control is enabled.

This allows user space to throttle input directly at the source also
when hardware-assisted flow control is enabled and makes dtr_rts()
always deassert both lines during close (when HUPCL is set).

Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/cp210x.c