From ee467a1f2066d2bfa293f7c2c7f1ff7000b0a39e Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Sun, 29 Dec 2013 19:23:17 +0100 Subject: USB: serial: add Moxa UPORT 12XX/14XX/16XX driver Add a driver which supports the following Moxa USB to serial converters: * 2 ports : UPort 1250, UPort 1250I * 4 ports : UPort 1410, UPort 1450, UPort 1450I * 8 ports : UPort 1610-8, UPort 1650-8 * 16 ports : UPort 1610-16, UPort 1650-16 The UPORT devices don't directly fit the USB serial model. USB serial assumes a bulk in/out endpoint pair per serial port. Thus a dual port USB serial device is expected to have two bulk in/out pairs. The Moxa UPORT only has one pair for data transfer and places a header on each transfer over the endpoint indicating for which port the transfer relates to. There is a second endpoint pair for events, such as modem control lines changing state, setting baud rates etc. Again, a multiplexing header is used on these endpoints. Some ports need to have a kfifo explicitly allocated since the framework does not allocate one if there is no associated endpoints. The framework will however free it on unload of the module. All data transfers are made on port0, yet the locks are taken on PortN. urb->context points to PortN, even though the URB is for port0. Where possible, code from the generic driver is called. However mxuport_process_read_urb_data() is mostly a cut/paste of usb_serial_generic_process_read_urb(). The driver will attempt to load firmware from userspace and compare the available version and the running version. If the available version is newer, it will be download into RAM of the device and started. This is optional and the driver appears to work O.K. with older firmware in the devices ROM. This driver is based on the MOXA driver and retains MOXAs copyright. [jhovold@gmail.com: fix get_fw_version error path and some style issues] Signed-off-by: Andrew Lunn Reviewed-by: Johan Hovold Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/Kconfig | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'drivers/usb/serial/Kconfig') diff --git a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig index ddb9c51f2c9..3ce5c74b29e 100644 --- a/drivers/usb/serial/Kconfig +++ b/drivers/usb/serial/Kconfig @@ -472,6 +472,35 @@ config USB_SERIAL_MOS7840 To compile this driver as a module, choose M here: the module will be called mos7840. If unsure, choose N. +config USB_SERIAL_MXUPORT + tristate "USB Moxa UPORT Serial Driver" + ---help--- + Say Y here if you want to use a MOXA UPort Serial hub. + + This driver supports: + + [2 Port] + - UPort 1250 : 2 Port RS-232/422/485 USB to Serial Hub + - UPort 1250I : 2 Port RS-232/422/485 USB to Serial Hub with + Isolation + + [4 Port] + - UPort 1410 : 4 Port RS-232 USB to Serial Hub + - UPort 1450 : 4 Port RS-232/422/485 USB to Serial Hub + - UPort 1450I : 4 Port RS-232/422/485 USB to Serial Hub with + Isolation + + [8 Port] + - UPort 1610-8 : 8 Port RS-232 USB to Serial Hub + - UPort 1650-8 : 8 Port RS-232/422/485 USB to Serial Hub + + [16 Port] + - UPort 1610-16 : 16 Port RS-232 USB to Serial Hub + - UPort 1650-16 : 16 Port RS-232/422/485 USB to Serial Hub + + To compile this driver as a module, choose M here: the + module will be called mxuport. + config USB_SERIAL_NAVMAN tristate "USB Navman GPS device" help -- cgit v1.2.3-70-g09d2