Skip to contentSkip to conversation

Driver for MaxLinear/Exar USB (UART) Serial adapters.

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Apr 4, 2018 USB

lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw
Quoted 33 lines · Patong Yang

The driver is based on the CDC-ACM driver. In addition to supporting the features of the MaxLinear/Exar USB UART devices, the driver also has support for 2 other functions per customer requirements:

- Specific entries are checked in the BIOS to detect if the board is a "Caracalla" board before enabling specific modes in the MaxLinear/Exar USB UARTs. The smbios code is based on the example at:
https://sourceforge.net/projects/smbios/

- When specific IOCTLs are called by a user-space application, a port_config file is created for the /dev/ttyXRUSB device at a specific USB tree location, and some configuration data is stored. The driver checks for the port_config file when the driver is loaded for each port and loads the configuration settings if there is a port_config file for the USB tree location.

---
 drivers/usb/serial/xrusb_serial.c | 3285 +++++++++++++++++++++++++++++++++++++
 drivers/usb/serial/xrusb_serial.h |  448 +++++
 2 files changed, 3733 insertions(+)
 create mode 100644 drivers/usb/serial/xrusb_serial.c
 create mode 100644 drivers/usb/serial/xrusb_serial.h
drivers/usb/serial/xrusb_serial.c new file +3 -0
new file mode 100644
index 000000000000..16a5bcff9103
@@ -0,0 +1,3285 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * xrusb_serial.c

drivers/usb/serial/xrusb_serial.c line 13

Quoted 10 lines
drivers/usb/serial/xrusb_serial.c new file +10 -0
+ *
+ * Copyright (c) 2018 Patong Yang <[email protected]>
+ *
+ * USB Serial Driver based on the cdc-acm.c driver for the
+ * MaxLinear/Exar USB UARTs/Serial adapters
+ */
+
+
+#undef DEBUG
+#undef VERBOSE_DEBUG

No need for these #undef in the driver.

And as Oliver points out, why does this have to be a totally different driver? And putting SMBIOS calls in a USB driver is very strange, can't the USB devices describe themselves properly?

thanks,

greg k-h
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html