USB: serial: cp210x: add support for software flow control
authorWang Sheng Long <shenglong.wang.ext@siemens.com>
Mon, 18 Jan 2021 11:13:26 +0000 (12:13 +0100)
committerJohan Hovold <johan@kernel.org>
Mon, 18 Jan 2021 13:24:27 +0000 (14:24 +0100)
commit7748feffcd80f3ee25dae5e6acd3cf90e8e838d8
treef00fbdc103372b63c493c38166db566aae87da80
parent979d9cbe75b922ab1695b8ad5576115774f72e62
USB: serial: cp210x: add support for software flow control

When data is transmitted between two serial ports, the phenomenon of
data loss often occurs. The two kinds of flow control commonly used in
serial communication are hardware flow control and software flow
control.

In serial communication, If you only use RX/TX/GND Pins, you can't do
hardware flow. So we often used software flow control and prevent data
loss. The user sets the software flow control through the application
program, and the application program sets the software flow control mode
for the serial port chip through the driver.

For the cp210 serial port chip, its driver lacks the software flow
control setting code, so the user cannot set the software flow control
function through the application program. This adds the missing software
flow control.

Signed-off-by: Wang Sheng Long <shenglong.wang.ext@siemens.com>
Link: https://lore.kernel.org/r/20210104094502.3942-1-china_shenglong@163.com
[ johan: rework properly on top of recent termios changes ]
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/cp210x.c