Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 93177d1f authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'usb-serial-3.18-rc1' of...

Merge tag 'usb-serial-3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial

 into usb-next

Johan writes:

USB-serial updates for v3.18-rc1

These changes add two new "simple" drivers, while removing the redundant
zte_ev driver (PIDs moved to option).

Included are also some minor clean ups to the xsens_mt driver, and the
enabling of further baud rates for pl2303 devices.

Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parents 18f340f9 f8c0e057
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -58,9 +58,11 @@ config USB_SERIAL_SIMPLE
	  handles a wide range of very simple devices, all in one
	  driver.  Specifically, it supports:
		- Suunto ANT+ USB device.
		- Medtronic CareLink USB device
		- Fundamental Software dongle.
		- HP4x calculators
		- a number of Motorola phones
		- Novatel Wireless GPS receivers
		- Siemens USB/MPI adapter.
		- ViVOtech ViVOpay USB device.
		- Infineon Modem Flashloader USB interface
@@ -682,14 +684,6 @@ config USB_SERIAL_WISHBONE
	  To compile this driver as a module, choose M here: the
	  module will be called wishbone-serial.

config USB_SERIAL_ZTE
	tristate "ZTE USB serial driver"
	help
	  Say Y here if you want to use a ZTE USB to serial device.

	  To compile this driver as a module, choose M here: the
	  module will be called zte.

config USB_SERIAL_SSU100
	tristate "USB Quatech SSU-100 Single Port Serial Driver"
	help
+0 −1
Original line number Diff line number Diff line
@@ -60,4 +60,3 @@ obj-$(CONFIG_USB_SERIAL_WISHBONE) += wishbone-serial.o
obj-$(CONFIG_USB_SERIAL_WHITEHEAT)		+= whiteheat.o
obj-$(CONFIG_USB_SERIAL_XIRCOM)			+= keyspan_pda.o
obj-$(CONFIG_USB_SERIAL_XSENS_MT)		+= xsens_mt.o
obj-$(CONFIG_USB_SERIAL_ZTE)			+= zte_ev.o
+10 −1
Original line number Diff line number Diff line
@@ -276,6 +276,7 @@ static void option_instat_callback(struct urb *urb);
#define ZTE_PRODUCT_MF628			0x0015
#define ZTE_PRODUCT_MF626			0x0031
#define ZTE_PRODUCT_AC2726			0xfff1
#define ZTE_PRODUCT_MG880			0xfffd
#define ZTE_PRODUCT_CDMA_TECH			0xfffe
#define ZTE_PRODUCT_AC8710T			0xffff
#define ZTE_PRODUCT_MC2718			0xffe8
@@ -1560,7 +1561,15 @@ static const struct usb_device_id option_ids[] = {
	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff92, 0xff, 0xff, 0xff) },
	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff93, 0xff, 0xff, 0xff) },
	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff94, 0xff, 0xff, 0xff) },

	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffec, 0xff, 0xff, 0xff) },
	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffee, 0xff, 0xff, 0xff) },
	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xfff6, 0xff, 0xff, 0xff) },
	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xfff7, 0xff, 0xff, 0xff) },
	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xfff8, 0xff, 0xff, 0xff) },
	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xfff9, 0xff, 0xff, 0xff) },
	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xfffb, 0xff, 0xff, 0xff) },
	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xfffc, 0xff, 0xff, 0xff) },
	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MG880, 0xff, 0xff, 0xff) },
	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) },
	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) },
	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710T, 0xff, 0xff, 0xff) },
+7 −6
Original line number Diff line number Diff line
@@ -162,6 +162,9 @@ static const struct pl2303_type_data pl2303_type_data[TYPE_COUNT] = {
		.max_baud_rate =	1228800,
		.quirks =		PL2303_QUIRK_LEGACY,
	},
	[TYPE_HX] = {
		.max_baud_rate =	12000000,
	},
};

static int pl2303_vendor_read(struct usb_serial *serial, u16 value,
@@ -395,16 +398,14 @@ static void pl2303_encode_baud_rate(struct tty_struct *tty,
	if (spriv->type->max_baud_rate)
		baud = min_t(speed_t, baud, spriv->type->max_baud_rate);
	/*
	 * Set baud rate to nearest supported value.
	 *
	 * NOTE: Baud rate 500k can only be set using divisors.
	 * Use direct method for supported baud rates, otherwise use divisors.
	 */
	baud_sup = pl2303_get_supported_baud_rate(baud);

	if (baud == 500000)
		baud = pl2303_encode_baud_rate_divisor(buf, baud);
	if (baud == baud_sup)
		baud = pl2303_encode_baud_rate_direct(buf, baud);
	else
		baud = pl2303_encode_baud_rate_direct(buf, baud_sup);
		baud = pl2303_encode_baud_rate_divisor(buf, baud);

	/* Save resulting baud rate */
	tty_encode_baud_rate(tty, baud, baud);
+17 −2
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
#include <linux/usb.h>
#include <linux/usb/serial.h>

#define DEVICE(vendor, IDS)					\
#define DEVICE_N(vendor, IDS, nport)				\
static const struct usb_device_id vendor##_id_table[] = {	\
	IDS(),							\
	{ },							\
@@ -31,9 +31,15 @@ static struct usb_serial_driver vendor##_device = { \
		.name =		#vendor,			\
	},							\
	.id_table =		vendor##_id_table,		\
	.num_ports =		1,				\
	.num_ports =		nport,				\
};

#define DEVICE(vendor, IDS)	DEVICE_N(vendor, IDS, 1)

/* Medtronic CareLink USB driver */
#define CARELINK_IDS()			\
	{ USB_DEVICE(0x0a21, 0x8001) }	/* MMT-7305WW */
DEVICE(carelink, CARELINK_IDS);

/* ZIO Motherboard USB driver */
#define ZIO_IDS()			\
@@ -64,6 +70,11 @@ DEVICE(vivopay, VIVOPAY_IDS);
	{ USB_DEVICE(0x22b8, 0x2c64) }	/* Motorola V950 phone */
DEVICE(moto_modem, MOTO_IDS);

/* Novatel Wireless GPS driver */
#define NOVATEL_IDS()			\
	{ USB_DEVICE(0x09d7, 0x0100) }	/* NovAtel FlexPack GPS */
DEVICE_N(novatel_gps, NOVATEL_IDS, 3);

/* HP4x (48/49) Generic Serial driver */
#define HP4X_IDS()			\
	{ USB_DEVICE(0x03f0, 0x0121) }
@@ -82,11 +93,13 @@ DEVICE(siemens_mpi, SIEMENS_IDS);

/* All of the above structures mushed into two lists */
static struct usb_serial_driver * const serial_drivers[] = {
	&carelink_device,
	&zio_device,
	&funsoft_device,
	&flashloader_device,
	&vivopay_device,
	&moto_modem_device,
	&novatel_gps_device,
	&hp4x_device,
	&suunto_device,
	&siemens_mpi_device,
@@ -94,11 +107,13 @@ static struct usb_serial_driver * const serial_drivers[] = {
};

static const struct usb_device_id id_table[] = {
	CARELINK_IDS(),
	ZIO_IDS(),
	FUNSOFT_IDS(),
	FLASHLOADER_IDS(),
	VIVOPAY_IDS(),
	MOTO_IDS(),
	NOVATEL_IDS(),
	HP4X_IDS(),
	SUUNTO_IDS(),
	SIEMENS_IDS(),
Loading