OSDN Git Service

USB: serial: add MaxLinear/Exar USB to Serial driver
authorManivannan Sadhasivam <mani@kernel.org>
Sun, 22 Nov 2020 17:08:20 +0000 (22:38 +0530)
committerJohan Hovold <johan@kernel.org>
Thu, 21 Jan 2021 09:49:37 +0000 (10:49 +0100)
commitc2d405aa86b451f197ee95cb08887130b86b765e
tree26a59b06ac12fbe02069f4146cb67835d7480469
parentcfb0fde7a7fab4509fdb4f7ab72d5fd7157c0aa0
USB: serial: add MaxLinear/Exar USB to Serial driver

Add support for MaxLinear/Exar USB to Serial converters. This driver
only supports XR21V141X series but it can be extended to other series
from Exar as well in future.

This driver is inspired from the initial one submitted by Patong Yang:

https://lore.kernel.org/r/20180404070634.nhspvmxcjwfgjkcv@advantechmxl-desktop

While the initial driver was a custom tty USB driver exposing whole
new serial interface ttyXRUSBn, this version is completely based on USB
serial core thus exposing the interfaces as ttyUSBn. This will avoid
the overhead of exposing a new USB serial interface which the userspace
tools are unaware of.

The Exar XR21V141X can be used in either ACM mode using the cdc-acm
driver or in "custom driver" mode in which further features such as
hardware and software flow control, GPIO control and in-band line-status
reporting are available.

In ACM mode the device always enables RTS/CTS flow control, something
which could prevent transmission in case the CTS input isn't wired up
corrently.

A follow-on patch will prevent cdc_acm from binding whenever this driver
is enabled.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Link: https://lore.kernel.org/r/20201122170822.21715-2-mani@kernel.org
[ johan: fix some style nits, group related functions, drop unused
 callbacks, and amend commit message; a few remaining
 non-trivial issues will be fixed separately ]
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/Kconfig
drivers/usb/serial/Makefile
drivers/usb/serial/xr_serial.c [new file with mode: 0644]