2013-08-05 11:27:19 +00:00
|
|
|
/*
|
|
|
|
* USB Serial "Simple" driver
|
|
|
|
*
|
|
|
|
* Copyright (C) 2001-2006,2008,2013 Greg Kroah-Hartman <greg@kroah.com>
|
|
|
|
* Copyright (C) 2005 Arthur Huillet (ahuillet@users.sf.net)
|
|
|
|
* Copyright (C) 2005 Thomas Hergenhahn <thomas.hergenhahn@suse.de>
|
|
|
|
* Copyright (C) 2009 Outpost Embedded, LLC
|
|
|
|
* Copyright (C) 2010 Zilogic Systems <code@zilogic.com>
|
|
|
|
* Copyright (C) 2013 Wei Shuai <cpuwolf@gmail.com>
|
|
|
|
* Copyright (C) 2013 Linux Foundation
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License version
|
|
|
|
* 2 as published by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/tty.h>
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/usb.h>
|
|
|
|
#include <linux/usb/serial.h>
|
|
|
|
|
2014-08-18 16:14:52 +00:00
|
|
|
#define DEVICE_N(vendor, IDS, nport) \
|
2013-08-05 11:27:19 +00:00
|
|
|
static const struct usb_device_id vendor##_id_table[] = { \
|
|
|
|
IDS(), \
|
|
|
|
{ }, \
|
|
|
|
}; \
|
|
|
|
static struct usb_serial_driver vendor##_device = { \
|
|
|
|
.driver = { \
|
|
|
|
.owner = THIS_MODULE, \
|
2013-08-18 19:29:00 +00:00
|
|
|
.name = #vendor, \
|
2013-08-05 11:27:19 +00:00
|
|
|
}, \
|
|
|
|
.id_table = vendor##_id_table, \
|
2014-08-18 16:14:52 +00:00
|
|
|
.num_ports = nport, \
|
2013-08-05 11:27:19 +00:00
|
|
|
};
|
|
|
|
|
2014-08-18 16:14:52 +00:00
|
|
|
#define DEVICE(vendor, IDS) DEVICE_N(vendor, IDS, 1)
|
2013-08-05 11:27:19 +00:00
|
|
|
|
2014-08-18 16:23:19 +00:00
|
|
|
/* Medtronic CareLink USB driver */
|
|
|
|
#define CARELINK_IDS() \
|
|
|
|
{ USB_DEVICE(0x0a21, 0x8001) } /* MMT-7305WW */
|
|
|
|
DEVICE(carelink, CARELINK_IDS);
|
2013-08-05 11:27:19 +00:00
|
|
|
|
|
|
|
/* ZIO Motherboard USB driver */
|
|
|
|
#define ZIO_IDS() \
|
|
|
|
{ USB_DEVICE(0x1CBE, 0x0103) }
|
|
|
|
DEVICE(zio, ZIO_IDS);
|
|
|
|
|
|
|
|
/* Funsoft Serial USB driver */
|
|
|
|
#define FUNSOFT_IDS() \
|
|
|
|
{ USB_DEVICE(0x1404, 0xcddc) }
|
|
|
|
DEVICE(funsoft, FUNSOFT_IDS);
|
|
|
|
|
|
|
|
/* Infineon Flashloader driver */
|
|
|
|
#define FLASHLOADER_IDS() \
|
2015-11-22 10:47:18 +00:00
|
|
|
{ USB_DEVICE_INTERFACE_CLASS(0x058b, 0x0041, USB_CLASS_CDC_DATA) }, \
|
2016-09-02 08:37:56 +00:00
|
|
|
{ USB_DEVICE(0x8087, 0x0716) }, \
|
|
|
|
{ USB_DEVICE(0x8087, 0x0801) }
|
2013-08-05 11:27:19 +00:00
|
|
|
DEVICE(flashloader, FLASHLOADER_IDS);
|
|
|
|
|
2014-11-03 16:43:20 +00:00
|
|
|
/* Google Serial USB SubClass */
|
|
|
|
#define GOOGLE_IDS() \
|
|
|
|
{ USB_VENDOR_AND_INTERFACE_INFO(0x18d1, \
|
|
|
|
USB_CLASS_VENDOR_SPEC, \
|
|
|
|
0x50, \
|
|
|
|
0x01) }
|
|
|
|
DEVICE(google, GOOGLE_IDS);
|
|
|
|
|
2013-08-05 11:27:19 +00:00
|
|
|
/* ViVOpay USB Serial Driver */
|
|
|
|
#define VIVOPAY_IDS() \
|
|
|
|
{ USB_DEVICE(0x1d5f, 0x1004) } /* ViVOpay 8800 */
|
|
|
|
DEVICE(vivopay, VIVOPAY_IDS);
|
|
|
|
|
|
|
|
/* Motorola USB Phone driver */
|
|
|
|
#define MOTO_IDS() \
|
|
|
|
{ USB_DEVICE(0x05c6, 0x3197) }, /* unknown Motorola phone */ \
|
2014-09-27 06:08:35 +00:00
|
|
|
{ USB_DEVICE(0x0c44, 0x0022) }, /* unknown Motorola phone */ \
|
2013-08-05 11:27:19 +00:00
|
|
|
{ USB_DEVICE(0x22b8, 0x2a64) }, /* Motorola KRZR K1m */ \
|
|
|
|
{ USB_DEVICE(0x22b8, 0x2c84) }, /* Motorola VE240 phone */ \
|
|
|
|
{ USB_DEVICE(0x22b8, 0x2c64) } /* Motorola V950 phone */
|
|
|
|
DEVICE(moto_modem, MOTO_IDS);
|
|
|
|
|
2014-08-18 16:14:53 +00:00
|
|
|
/* Novatel Wireless GPS driver */
|
|
|
|
#define NOVATEL_IDS() \
|
|
|
|
{ USB_DEVICE(0x09d7, 0x0100) } /* NovAtel FlexPack GPS */
|
|
|
|
DEVICE_N(novatel_gps, NOVATEL_IDS, 3);
|
|
|
|
|
2013-08-05 11:27:19 +00:00
|
|
|
/* HP4x (48/49) Generic Serial driver */
|
|
|
|
#define HP4X_IDS() \
|
|
|
|
{ USB_DEVICE(0x03f0, 0x0121) }
|
|
|
|
DEVICE(hp4x, HP4X_IDS);
|
|
|
|
|
|
|
|
/* Suunto ANT+ USB Driver */
|
|
|
|
#define SUUNTO_IDS() \
|
2014-01-24 11:18:35 +00:00
|
|
|
{ USB_DEVICE(0x0fcf, 0x1008) }, \
|
|
|
|
{ USB_DEVICE(0x0fcf, 0x1009) } /* Dynastream ANT USB-m Stick */
|
2013-08-05 11:27:19 +00:00
|
|
|
DEVICE(suunto, SUUNTO_IDS);
|
|
|
|
|
|
|
|
/* Siemens USB/MPI adapter */
|
|
|
|
#define SIEMENS_IDS() \
|
|
|
|
{ USB_DEVICE(0x908, 0x0004) }
|
|
|
|
DEVICE(siemens_mpi, SIEMENS_IDS);
|
|
|
|
|
|
|
|
/* All of the above structures mushed into two lists */
|
|
|
|
static struct usb_serial_driver * const serial_drivers[] = {
|
2014-08-18 16:23:19 +00:00
|
|
|
&carelink_device,
|
2013-08-05 11:27:19 +00:00
|
|
|
&zio_device,
|
|
|
|
&funsoft_device,
|
|
|
|
&flashloader_device,
|
2014-11-03 16:43:20 +00:00
|
|
|
&google_device,
|
2013-08-05 11:27:19 +00:00
|
|
|
&vivopay_device,
|
|
|
|
&moto_modem_device,
|
2014-08-18 16:14:53 +00:00
|
|
|
&novatel_gps_device,
|
2013-08-05 11:27:19 +00:00
|
|
|
&hp4x_device,
|
|
|
|
&suunto_device,
|
|
|
|
&siemens_mpi_device,
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct usb_device_id id_table[] = {
|
2014-08-18 16:23:19 +00:00
|
|
|
CARELINK_IDS(),
|
2013-08-05 11:27:19 +00:00
|
|
|
ZIO_IDS(),
|
|
|
|
FUNSOFT_IDS(),
|
|
|
|
FLASHLOADER_IDS(),
|
2014-11-03 16:43:20 +00:00
|
|
|
GOOGLE_IDS(),
|
2013-08-05 11:27:19 +00:00
|
|
|
VIVOPAY_IDS(),
|
|
|
|
MOTO_IDS(),
|
2014-08-18 16:14:53 +00:00
|
|
|
NOVATEL_IDS(),
|
2013-08-05 11:27:19 +00:00
|
|
|
HP4X_IDS(),
|
|
|
|
SUUNTO_IDS(),
|
|
|
|
SIEMENS_IDS(),
|
|
|
|
{ },
|
|
|
|
};
|
|
|
|
MODULE_DEVICE_TABLE(usb, id_table);
|
|
|
|
|
|
|
|
module_usb_serial_driver(serial_drivers, id_table);
|
|
|
|
MODULE_LICENSE("GPL");
|