diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-05 07:27:19 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-12 15:14:52 -0400 |
commit | 1f9230713af17657f7ed503a12ddd739d0f48089 (patch) | |
tree | f4e3d3f9e6856b4da0085beabe8dbf81fecb729c /drivers/usb/serial | |
parent | 3804fad45411b48233b48003e33a78f290d227c8 (diff) |
USB: serial: move the "simple" drivers into usb-serial-simple.c
Instead of having to create a new driver for a "simple" usb to serial
device, mush them all into one file, with a macro, so as to make it easy
to add new ones.
Cc: "René Bürgel" <rene.buergel@sohard.de>
Acked-by: Wei Shuai <cpuwolf@gmail.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Acked-by: Frans Klaver <frans.klaver@xsens.com>
Cc: "Wesley W. Terpstra" <w.terpstra@gsi.de>
Cc: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/Kconfig | 84 | ||||
-rw-r--r-- | drivers/usb/serial/Makefile | 9 | ||||
-rw-r--r-- | drivers/usb/serial/flashloader.c | 39 | ||||
-rw-r--r-- | drivers/usb/serial/funsoft.c | 40 | ||||
-rw-r--r-- | drivers/usb/serial/hp4x.c | 51 | ||||
-rw-r--r-- | drivers/usb/serial/moto_modem.c | 48 | ||||
-rw-r--r-- | drivers/usb/serial/siemens_mpi.c | 47 | ||||
-rw-r--r-- | drivers/usb/serial/suunto.c | 41 | ||||
-rw-r--r-- | drivers/usb/serial/usb-serial-simple.c | 110 | ||||
-rw-r--r-- | drivers/usb/serial/vivopay-serial.c | 43 | ||||
-rw-r--r-- | drivers/usb/serial/zio.c | 39 |
11 files changed, 129 insertions, 422 deletions
diff --git a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig index 7eef9b33fde6..c454bfa22a10 100644 --- a/drivers/usb/serial/Kconfig +++ b/drivers/usb/serial/Kconfig | |||
@@ -51,6 +51,24 @@ config USB_SERIAL_GENERIC | |||
51 | support" be compiled as a module for this driver to be used | 51 | support" be compiled as a module for this driver to be used |
52 | properly. | 52 | properly. |
53 | 53 | ||
54 | config USB_SERIAL_SIMPLE | ||
55 | tristate "USB Serial Simple Driver" | ||
56 | help | ||
57 | Say Y here to use the USB serial "simple" driver. This driver | ||
58 | handles a wide range of very simple devices, all in one | ||
59 | driver. Specifically, it supports: | ||
60 | - Suunto ANT+ USB device. | ||
61 | - Fundamental Software dongle. | ||
62 | - HP4x calculators | ||
63 | - a number of Motoroloa phones | ||
64 | - Siemens USB/MPI adapter. | ||
65 | - ViVOtech ViVOpay USB device. | ||
66 | - Infineon Modem Flashloader USB interface | ||
67 | - ZIO Motherboard USB serial interface | ||
68 | |||
69 | To compile this driver as a module, choose M here: the module | ||
70 | will be called usb-serial-simple. | ||
71 | |||
54 | config USB_SERIAL_AIRCABLE | 72 | config USB_SERIAL_AIRCABLE |
55 | tristate "USB AIRcable Bluetooth Dongle Driver" | 73 | tristate "USB AIRcable Bluetooth Dongle Driver" |
56 | help | 74 | help |
@@ -158,14 +176,6 @@ config USB_SERIAL_FTDI_SIO | |||
158 | To compile this driver as a module, choose M here: the | 176 | To compile this driver as a module, choose M here: the |
159 | module will be called ftdi_sio. | 177 | module will be called ftdi_sio. |
160 | 178 | ||
161 | config USB_SERIAL_FUNSOFT | ||
162 | tristate "USB Fundamental Software Dongle Driver" | ||
163 | ---help--- | ||
164 | Say Y here if you want to use the Fundamental Software dongle. | ||
165 | |||
166 | To compile this driver as a module, choose M here: the | ||
167 | module will be called funsoft. | ||
168 | |||
169 | config USB_SERIAL_VISOR | 179 | config USB_SERIAL_VISOR |
170 | tristate "USB Handspring Visor / Palm m50x / Sony Clie Driver" | 180 | tristate "USB Handspring Visor / Palm m50x / Sony Clie Driver" |
171 | help | 181 | help |
@@ -462,15 +472,6 @@ config USB_SERIAL_MOS7840 | |||
462 | To compile this driver as a module, choose M here: the | 472 | To compile this driver as a module, choose M here: the |
463 | module will be called mos7840. If unsure, choose N. | 473 | module will be called mos7840. If unsure, choose N. |
464 | 474 | ||
465 | config USB_SERIAL_MOTOROLA | ||
466 | tristate "USB Motorola Phone modem driver" | ||
467 | ---help--- | ||
468 | Say Y here if you want to use a Motorola phone with a USB | ||
469 | connector as a modem link. | ||
470 | |||
471 | To compile this driver as a module, choose M here: the | ||
472 | module will be called moto_modem. If unsure, choose N. | ||
473 | |||
474 | config USB_SERIAL_NAVMAN | 475 | config USB_SERIAL_NAVMAN |
475 | tristate "USB Navman GPS device" | 476 | tristate "USB Navman GPS device" |
476 | help | 477 | help |
@@ -525,14 +526,6 @@ config USB_SERIAL_SPCP8X5 | |||
525 | To compile this driver as a module, choose M here: the | 526 | To compile this driver as a module, choose M here: the |
526 | module will be called spcp8x5. | 527 | module will be called spcp8x5. |
527 | 528 | ||
528 | config USB_SERIAL_HP4X | ||
529 | tristate "USB HP4x Calculators support" | ||
530 | help | ||
531 | Say Y here if you want to use an Hewlett-Packard 4x Calculator. | ||
532 | |||
533 | To compile this driver as a module, choose M here: the | ||
534 | module will be called hp4x. | ||
535 | |||
536 | config USB_SERIAL_SAFE | 529 | config USB_SERIAL_SAFE |
537 | tristate "USB Safe Serial (Encapsulated) Driver" | 530 | tristate "USB Safe Serial (Encapsulated) Driver" |
538 | 531 | ||
@@ -540,14 +533,6 @@ config USB_SERIAL_SAFE_PADDED | |||
540 | bool "USB Secure Encapsulated Driver - Padded" | 533 | bool "USB Secure Encapsulated Driver - Padded" |
541 | depends on USB_SERIAL_SAFE | 534 | depends on USB_SERIAL_SAFE |
542 | 535 | ||
543 | config USB_SERIAL_SIEMENS_MPI | ||
544 | tristate "USB Siemens MPI driver" | ||
545 | help | ||
546 | Say M here if you want to use a Siemens USB/MPI adapter. | ||
547 | |||
548 | To compile this driver as a module, choose M here: the | ||
549 | module will be called siemens_mpi. | ||
550 | |||
551 | config USB_SERIAL_SIERRAWIRELESS | 536 | config USB_SERIAL_SIERRAWIRELESS |
552 | tristate "USB Sierra Wireless Driver" | 537 | tristate "USB Sierra Wireless Driver" |
553 | help | 538 | help |
@@ -639,14 +624,6 @@ config USB_SERIAL_OPTICON | |||
639 | To compile this driver as a module, choose M here: the | 624 | To compile this driver as a module, choose M here: the |
640 | module will be called opticon. | 625 | module will be called opticon. |
641 | 626 | ||
642 | config USB_SERIAL_VIVOPAY_SERIAL | ||
643 | tristate "USB ViVOpay serial interface driver" | ||
644 | help | ||
645 | Say Y here if you want to use a ViVOtech ViVOpay USB device. | ||
646 | |||
647 | To compile this driver as a module, choose M here: the | ||
648 | module will be called vivopay-serial. | ||
649 | |||
650 | config USB_SERIAL_XSENS_MT | 627 | config USB_SERIAL_XSENS_MT |
651 | tristate "Xsens motion tracker serial interface driver" | 628 | tristate "Xsens motion tracker serial interface driver" |
652 | help | 629 | help |
@@ -659,14 +636,6 @@ config USB_SERIAL_XSENS_MT | |||
659 | To compile this driver as a module, choose M here: the | 636 | To compile this driver as a module, choose M here: the |
660 | module will be called xsens_mt. | 637 | module will be called xsens_mt. |
661 | 638 | ||
662 | config USB_SERIAL_ZIO | ||
663 | tristate "ZIO Motherboard USB serial interface driver" | ||
664 | help | ||
665 | Say Y here if you want to use ZIO Motherboard. | ||
666 | |||
667 | To compile this driver as a module, choose M here: the | ||
668 | module will be called zio. | ||
669 | |||
670 | config USB_SERIAL_WISHBONE | 639 | config USB_SERIAL_WISHBONE |
671 | tristate "USB-Wishbone adapter interface driver" | 640 | tristate "USB-Wishbone adapter interface driver" |
672 | help | 641 | help |
@@ -710,23 +679,6 @@ config USB_SERIAL_QT2 | |||
710 | To compile this driver as a module, choose M here: the | 679 | To compile this driver as a module, choose M here: the |
711 | module will be called quatech-serial. | 680 | module will be called quatech-serial. |
712 | 681 | ||
713 | config USB_SERIAL_FLASHLOADER | ||
714 | tristate "Infineon Modem Flashloader USB interface driver" | ||
715 | help | ||
716 | Say Y here if you want to download Infineon Modem | ||
717 | via USB Flashloader serial driver. | ||
718 | |||
719 | To compile this driver as a module, choose M here: the | ||
720 | module will be called flashloader. | ||
721 | |||
722 | config USB_SERIAL_SUUNTO | ||
723 | tristate "USB Suunto ANT+ driver" | ||
724 | help | ||
725 | Say Y here if you want to use the Suunto ANT+ USB device. | ||
726 | |||
727 | To compile this driver as a module, choose M here: the | ||
728 | module will be called suunto. | ||
729 | |||
730 | config USB_SERIAL_DEBUG | 682 | config USB_SERIAL_DEBUG |
731 | tristate "USB Debugging Device" | 683 | tristate "USB Debugging Device" |
732 | help | 684 | help |
diff --git a/drivers/usb/serial/Makefile b/drivers/usb/serial/Makefile index a14a870d993f..42670f0b5bc0 100644 --- a/drivers/usb/serial/Makefile +++ b/drivers/usb/serial/Makefile | |||
@@ -24,9 +24,7 @@ obj-$(CONFIG_USB_SERIAL_EDGEPORT_TI) += io_ti.o | |||
24 | obj-$(CONFIG_USB_SERIAL_EMPEG) += empeg.o | 24 | obj-$(CONFIG_USB_SERIAL_EMPEG) += empeg.o |
25 | obj-$(CONFIG_USB_SERIAL_F81232) += f81232.o | 25 | obj-$(CONFIG_USB_SERIAL_F81232) += f81232.o |
26 | obj-$(CONFIG_USB_SERIAL_FTDI_SIO) += ftdi_sio.o | 26 | obj-$(CONFIG_USB_SERIAL_FTDI_SIO) += ftdi_sio.o |
27 | obj-$(CONFIG_USB_SERIAL_FUNSOFT) += funsoft.o | ||
28 | obj-$(CONFIG_USB_SERIAL_GARMIN) += garmin_gps.o | 27 | obj-$(CONFIG_USB_SERIAL_GARMIN) += garmin_gps.o |
29 | obj-$(CONFIG_USB_SERIAL_HP4X) += hp4x.o | ||
30 | obj-$(CONFIG_USB_SERIAL_IPAQ) += ipaq.o | 28 | obj-$(CONFIG_USB_SERIAL_IPAQ) += ipaq.o |
31 | obj-$(CONFIG_USB_SERIAL_IPW) += ipw.o | 29 | obj-$(CONFIG_USB_SERIAL_IPW) += ipw.o |
32 | obj-$(CONFIG_USB_SERIAL_IR) += ir-usb.o | 30 | obj-$(CONFIG_USB_SERIAL_IR) += ir-usb.o |
@@ -39,7 +37,6 @@ obj-$(CONFIG_USB_SERIAL_MCT_U232) += mct_u232.o | |||
39 | obj-$(CONFIG_USB_SERIAL_METRO) += metro-usb.o | 37 | obj-$(CONFIG_USB_SERIAL_METRO) += metro-usb.o |
40 | obj-$(CONFIG_USB_SERIAL_MOS7720) += mos7720.o | 38 | obj-$(CONFIG_USB_SERIAL_MOS7720) += mos7720.o |
41 | obj-$(CONFIG_USB_SERIAL_MOS7840) += mos7840.o | 39 | obj-$(CONFIG_USB_SERIAL_MOS7840) += mos7840.o |
42 | obj-$(CONFIG_USB_SERIAL_MOTOROLA) += moto_modem.o | ||
43 | obj-$(CONFIG_USB_SERIAL_NAVMAN) += navman.o | 40 | obj-$(CONFIG_USB_SERIAL_NAVMAN) += navman.o |
44 | obj-$(CONFIG_USB_SERIAL_OMNINET) += omninet.o | 41 | obj-$(CONFIG_USB_SERIAL_OMNINET) += omninet.o |
45 | obj-$(CONFIG_USB_SERIAL_OPTICON) += opticon.o | 42 | obj-$(CONFIG_USB_SERIAL_OPTICON) += opticon.o |
@@ -50,11 +47,10 @@ obj-$(CONFIG_USB_SERIAL_QCAUX) += qcaux.o | |||
50 | obj-$(CONFIG_USB_SERIAL_QUALCOMM) += qcserial.o | 47 | obj-$(CONFIG_USB_SERIAL_QUALCOMM) += qcserial.o |
51 | obj-$(CONFIG_USB_SERIAL_QT2) += quatech2.o | 48 | obj-$(CONFIG_USB_SERIAL_QT2) += quatech2.o |
52 | obj-$(CONFIG_USB_SERIAL_SAFE) += safe_serial.o | 49 | obj-$(CONFIG_USB_SERIAL_SAFE) += safe_serial.o |
53 | obj-$(CONFIG_USB_SERIAL_SIEMENS_MPI) += siemens_mpi.o | ||
54 | obj-$(CONFIG_USB_SERIAL_SIERRAWIRELESS) += sierra.o | 50 | obj-$(CONFIG_USB_SERIAL_SIERRAWIRELESS) += sierra.o |
51 | obj-$(CONFIG_USB_SERIAL_SIMPLE) += usb-serial-simple.o | ||
55 | obj-$(CONFIG_USB_SERIAL_SPCP8X5) += spcp8x5.o | 52 | obj-$(CONFIG_USB_SERIAL_SPCP8X5) += spcp8x5.o |
56 | obj-$(CONFIG_USB_SERIAL_SSU100) += ssu100.o | 53 | obj-$(CONFIG_USB_SERIAL_SSU100) += ssu100.o |
57 | obj-$(CONFIG_USB_SERIAL_SUUNTO) += suunto.o | ||
58 | obj-$(CONFIG_USB_SERIAL_SYMBOL) += symbolserial.o | 54 | obj-$(CONFIG_USB_SERIAL_SYMBOL) += symbolserial.o |
59 | obj-$(CONFIG_USB_SERIAL_WWAN) += usb_wwan.o | 55 | obj-$(CONFIG_USB_SERIAL_WWAN) += usb_wwan.o |
60 | obj-$(CONFIG_USB_SERIAL_TI) += ti_usb_3410_5052.o | 56 | obj-$(CONFIG_USB_SERIAL_TI) += ti_usb_3410_5052.o |
@@ -62,8 +58,5 @@ obj-$(CONFIG_USB_SERIAL_VISOR) += visor.o | |||
62 | obj-$(CONFIG_USB_SERIAL_WISHBONE) += wishbone-serial.o | 58 | obj-$(CONFIG_USB_SERIAL_WISHBONE) += wishbone-serial.o |
63 | obj-$(CONFIG_USB_SERIAL_WHITEHEAT) += whiteheat.o | 59 | obj-$(CONFIG_USB_SERIAL_WHITEHEAT) += whiteheat.o |
64 | obj-$(CONFIG_USB_SERIAL_XIRCOM) += keyspan_pda.o | 60 | obj-$(CONFIG_USB_SERIAL_XIRCOM) += keyspan_pda.o |
65 | obj-$(CONFIG_USB_SERIAL_VIVOPAY_SERIAL) += vivopay-serial.o | ||
66 | obj-$(CONFIG_USB_SERIAL_XSENS_MT) += xsens_mt.o | 61 | obj-$(CONFIG_USB_SERIAL_XSENS_MT) += xsens_mt.o |
67 | obj-$(CONFIG_USB_SERIAL_ZIO) += zio.o | ||
68 | obj-$(CONFIG_USB_SERIAL_ZTE) += zte_ev.o | 62 | obj-$(CONFIG_USB_SERIAL_ZTE) += zte_ev.o |
69 | obj-$(CONFIG_USB_SERIAL_FLASHLOADER) += flashloader.o | ||
diff --git a/drivers/usb/serial/flashloader.c b/drivers/usb/serial/flashloader.c deleted file mode 100644 index e6f5c10e891c..000000000000 --- a/drivers/usb/serial/flashloader.c +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /* | ||
2 | * Infineon Flashloader driver | ||
3 | * | ||
4 | * Copyright (C) 2013 Wei Shuai <cpuwolf@gmail.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License version | ||
8 | * 2 as published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/tty.h> | ||
14 | #include <linux/module.h> | ||
15 | #include <linux/usb.h> | ||
16 | #include <linux/usb/serial.h> | ||
17 | #include <linux/uaccess.h> | ||
18 | |||
19 | static const struct usb_device_id id_table[] = { | ||
20 | { USB_DEVICE(0x8087, 0x0716) }, | ||
21 | { }, | ||
22 | }; | ||
23 | MODULE_DEVICE_TABLE(usb, id_table); | ||
24 | |||
25 | static struct usb_serial_driver flashloader_device = { | ||
26 | .driver = { | ||
27 | .owner = THIS_MODULE, | ||
28 | .name = "flashloader", | ||
29 | }, | ||
30 | .id_table = id_table, | ||
31 | .num_ports = 1, | ||
32 | }; | ||
33 | |||
34 | static struct usb_serial_driver * const serial_drivers[] = { | ||
35 | &flashloader_device, NULL | ||
36 | }; | ||
37 | |||
38 | module_usb_serial_driver(serial_drivers, id_table); | ||
39 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/usb/serial/funsoft.c b/drivers/usb/serial/funsoft.c deleted file mode 100644 index 9362f8fd2385..000000000000 --- a/drivers/usb/serial/funsoft.c +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * Funsoft Serial USB driver | ||
3 | * | ||
4 | * Copyright (C) 2006 Greg Kroah-Hartman <gregkh@suse.de> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License version | ||
8 | * 2 as published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/tty.h> | ||
14 | #include <linux/module.h> | ||
15 | #include <linux/usb.h> | ||
16 | #include <linux/usb/serial.h> | ||
17 | #include <linux/uaccess.h> | ||
18 | |||
19 | static const struct usb_device_id id_table[] = { | ||
20 | { USB_DEVICE(0x1404, 0xcddc) }, | ||
21 | { }, | ||
22 | }; | ||
23 | MODULE_DEVICE_TABLE(usb, id_table); | ||
24 | |||
25 | static struct usb_serial_driver funsoft_device = { | ||
26 | .driver = { | ||
27 | .owner = THIS_MODULE, | ||
28 | .name = "funsoft", | ||
29 | }, | ||
30 | .id_table = id_table, | ||
31 | .num_ports = 1, | ||
32 | }; | ||
33 | |||
34 | static struct usb_serial_driver * const serial_drivers[] = { | ||
35 | &funsoft_device, NULL | ||
36 | }; | ||
37 | |||
38 | module_usb_serial_driver(serial_drivers, id_table); | ||
39 | |||
40 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/usb/serial/hp4x.c b/drivers/usb/serial/hp4x.c deleted file mode 100644 index 2cba60d90c79..000000000000 --- a/drivers/usb/serial/hp4x.c +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /* | ||
2 | * HP4x Calculators Serial USB driver | ||
3 | * | ||
4 | * Copyright (C) 2005 Arthur Huillet (ahuillet@users.sf.net) | ||
5 | * Copyright (C) 2001-2005 Greg Kroah-Hartman (greg@kroah.com) | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * See Documentation/usb/usb-serial.txt for more information on using this | ||
13 | * driver | ||
14 | */ | ||
15 | |||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/tty.h> | ||
19 | #include <linux/module.h> | ||
20 | #include <linux/usb.h> | ||
21 | #include <linux/usb/serial.h> | ||
22 | |||
23 | #define DRIVER_DESC "HP4x (48/49) Generic Serial driver" | ||
24 | |||
25 | #define HP_VENDOR_ID 0x03f0 | ||
26 | #define HP49GP_PRODUCT_ID 0x0121 | ||
27 | |||
28 | static const struct usb_device_id id_table[] = { | ||
29 | { USB_DEVICE(HP_VENDOR_ID, HP49GP_PRODUCT_ID) }, | ||
30 | { } /* Terminating entry */ | ||
31 | }; | ||
32 | |||
33 | MODULE_DEVICE_TABLE(usb, id_table); | ||
34 | |||
35 | static struct usb_serial_driver hp49gp_device = { | ||
36 | .driver = { | ||
37 | .owner = THIS_MODULE, | ||
38 | .name = "hp4X", | ||
39 | }, | ||
40 | .id_table = id_table, | ||
41 | .num_ports = 1, | ||
42 | }; | ||
43 | |||
44 | static struct usb_serial_driver * const serial_drivers[] = { | ||
45 | &hp49gp_device, NULL | ||
46 | }; | ||
47 | |||
48 | module_usb_serial_driver(serial_drivers, id_table); | ||
49 | |||
50 | MODULE_DESCRIPTION(DRIVER_DESC); | ||
51 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/usb/serial/moto_modem.c b/drivers/usb/serial/moto_modem.c deleted file mode 100644 index c5ff6c7795a6..000000000000 --- a/drivers/usb/serial/moto_modem.c +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * Motorola USB Phone driver | ||
3 | * | ||
4 | * Copyright (C) 2008 Greg Kroah-Hartman <greg@kroah.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * {sigh} | ||
11 | * Motorola should be using the CDC ACM USB spec, but instead | ||
12 | * they try to just "do their own thing"... This driver should handle a | ||
13 | * few phones in which a basic "dumb serial connection" is needed to be | ||
14 | * able to get a connection through to them. | ||
15 | */ | ||
16 | |||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/tty.h> | ||
20 | #include <linux/module.h> | ||
21 | #include <linux/usb.h> | ||
22 | #include <linux/usb/serial.h> | ||
23 | |||
24 | static const struct usb_device_id id_table[] = { | ||
25 | { USB_DEVICE(0x05c6, 0x3197) }, /* unknown Motorola phone */ | ||
26 | { USB_DEVICE(0x0c44, 0x0022) }, /* unknown Mororola phone */ | ||
27 | { USB_DEVICE(0x22b8, 0x2a64) }, /* Motorola KRZR K1m */ | ||
28 | { USB_DEVICE(0x22b8, 0x2c84) }, /* Motorola VE240 phone */ | ||
29 | { USB_DEVICE(0x22b8, 0x2c64) }, /* Motorola V950 phone */ | ||
30 | { }, | ||
31 | }; | ||
32 | MODULE_DEVICE_TABLE(usb, id_table); | ||
33 | |||
34 | static struct usb_serial_driver moto_device = { | ||
35 | .driver = { | ||
36 | .owner = THIS_MODULE, | ||
37 | .name = "moto-modem", | ||
38 | }, | ||
39 | .id_table = id_table, | ||
40 | .num_ports = 1, | ||
41 | }; | ||
42 | |||
43 | static struct usb_serial_driver * const serial_drivers[] = { | ||
44 | &moto_device, NULL | ||
45 | }; | ||
46 | |||
47 | module_usb_serial_driver(serial_drivers, id_table); | ||
48 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/usb/serial/siemens_mpi.c b/drivers/usb/serial/siemens_mpi.c deleted file mode 100644 index a76b1ae54a2a..000000000000 --- a/drivers/usb/serial/siemens_mpi.c +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /* | ||
2 | * Siemens USB-MPI Serial USB driver | ||
3 | * | ||
4 | * Copyright (C) 2005 Thomas Hergenhahn <thomas.hergenhahn@suse.de> | ||
5 | * Copyright (C) 2005,2008 Greg Kroah-Hartman <gregkh@suse.de> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License version | ||
9 | * 2 as published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/tty.h> | ||
15 | #include <linux/module.h> | ||
16 | #include <linux/usb.h> | ||
17 | #include <linux/usb/serial.h> | ||
18 | |||
19 | #define DRIVER_AUTHOR "Thomas Hergenhahn@web.de http://libnodave.sf.net" | ||
20 | #define DRIVER_DESC "Driver for Siemens USB/MPI adapter" | ||
21 | |||
22 | |||
23 | static const struct usb_device_id id_table[] = { | ||
24 | /* Vendor and product id for 6ES7-972-0CB20-0XA0 */ | ||
25 | { USB_DEVICE(0x908, 0x0004) }, | ||
26 | { }, | ||
27 | }; | ||
28 | MODULE_DEVICE_TABLE(usb, id_table); | ||
29 | |||
30 | static struct usb_serial_driver siemens_usb_mpi_device = { | ||
31 | .driver = { | ||
32 | .owner = THIS_MODULE, | ||
33 | .name = "siemens_mpi", | ||
34 | }, | ||
35 | .id_table = id_table, | ||
36 | .num_ports = 1, | ||
37 | }; | ||
38 | |||
39 | static struct usb_serial_driver * const serial_drivers[] = { | ||
40 | &siemens_usb_mpi_device, NULL | ||
41 | }; | ||
42 | |||
43 | module_usb_serial_driver(serial_drivers, id_table); | ||
44 | |||
45 | MODULE_AUTHOR(DRIVER_AUTHOR); | ||
46 | MODULE_DESCRIPTION(DRIVER_DESC); | ||
47 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/usb/serial/suunto.c b/drivers/usb/serial/suunto.c deleted file mode 100644 index 2248e7a7d5ad..000000000000 --- a/drivers/usb/serial/suunto.c +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | /* | ||
2 | * Suunto ANT+ USB Driver | ||
3 | * | ||
4 | * Copyright (C) 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
5 | * Copyright (C) 2013 Linux Foundation | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation only. | ||
10 | */ | ||
11 | |||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/tty.h> | ||
15 | #include <linux/module.h> | ||
16 | #include <linux/usb.h> | ||
17 | #include <linux/usb/serial.h> | ||
18 | #include <linux/uaccess.h> | ||
19 | |||
20 | static const struct usb_device_id id_table[] = { | ||
21 | { USB_DEVICE(0x0fcf, 0x1008) }, | ||
22 | { }, | ||
23 | }; | ||
24 | MODULE_DEVICE_TABLE(usb, id_table); | ||
25 | |||
26 | static struct usb_serial_driver suunto_device = { | ||
27 | .driver = { | ||
28 | .owner = THIS_MODULE, | ||
29 | .name = KBUILD_MODNAME, | ||
30 | }, | ||
31 | .id_table = id_table, | ||
32 | .num_ports = 1, | ||
33 | }; | ||
34 | |||
35 | static struct usb_serial_driver * const serial_drivers[] = { | ||
36 | &suunto_device, | ||
37 | NULL, | ||
38 | }; | ||
39 | |||
40 | module_usb_serial_driver(serial_drivers, id_table); | ||
41 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/usb/serial/usb-serial-simple.c b/drivers/usb/serial/usb-serial-simple.c new file mode 100644 index 000000000000..6a06131f48f4 --- /dev/null +++ b/drivers/usb/serial/usb-serial-simple.c | |||
@@ -0,0 +1,110 @@ | |||
1 | /* | ||
2 | * USB Serial "Simple" driver | ||
3 | * | ||
4 | * Copyright (C) 2001-2006,2008,2013 Greg Kroah-Hartman <greg@kroah.com> | ||
5 | * Copyright (C) 2005 Arthur Huillet (ahuillet@users.sf.net) | ||
6 | * Copyright (C) 2005 Thomas Hergenhahn <thomas.hergenhahn@suse.de> | ||
7 | * Copyright (C) 2009 Outpost Embedded, LLC | ||
8 | * Copyright (C) 2010 Zilogic Systems <code@zilogic.com> | ||
9 | * Copyright (C) 2013 Wei Shuai <cpuwolf@gmail.com> | ||
10 | * Copyright (C) 2013 Linux Foundation | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License version | ||
14 | * 2 as published by the Free Software Foundation. | ||
15 | */ | ||
16 | |||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/tty.h> | ||
20 | #include <linux/module.h> | ||
21 | #include <linux/usb.h> | ||
22 | #include <linux/usb/serial.h> | ||
23 | |||
24 | #define DEVICE(vendor, IDS) \ | ||
25 | static const struct usb_device_id vendor##_id_table[] = { \ | ||
26 | IDS(), \ | ||
27 | { }, \ | ||
28 | }; \ | ||
29 | static struct usb_serial_driver vendor##_device = { \ | ||
30 | .driver = { \ | ||
31 | .owner = THIS_MODULE, \ | ||
32 | .name = "stringify(vendor)", \ | ||
33 | }, \ | ||
34 | .id_table = vendor##_id_table, \ | ||
35 | .num_ports = 1, \ | ||
36 | }; | ||
37 | |||
38 | |||
39 | /* ZIO Motherboard USB driver */ | ||
40 | #define ZIO_IDS() \ | ||
41 | { USB_DEVICE(0x1CBE, 0x0103) } | ||
42 | DEVICE(zio, ZIO_IDS); | ||
43 | |||
44 | /* Funsoft Serial USB driver */ | ||
45 | #define FUNSOFT_IDS() \ | ||
46 | { USB_DEVICE(0x1404, 0xcddc) } | ||
47 | DEVICE(funsoft, FUNSOFT_IDS); | ||
48 | |||
49 | /* Infineon Flashloader driver */ | ||
50 | #define FLASHLOADER_IDS() \ | ||
51 | { USB_DEVICE(0x8087, 0x0716) } | ||
52 | DEVICE(flashloader, FLASHLOADER_IDS); | ||
53 | |||
54 | /* ViVOpay USB Serial Driver */ | ||
55 | #define VIVOPAY_IDS() \ | ||
56 | { USB_DEVICE(0x1d5f, 0x1004) } /* ViVOpay 8800 */ | ||
57 | DEVICE(vivopay, VIVOPAY_IDS); | ||
58 | |||
59 | /* Motorola USB Phone driver */ | ||
60 | #define MOTO_IDS() \ | ||
61 | { USB_DEVICE(0x05c6, 0x3197) }, /* unknown Motorola phone */ \ | ||
62 | { USB_DEVICE(0x0c44, 0x0022) }, /* unknown Mororola phone */ \ | ||
63 | { USB_DEVICE(0x22b8, 0x2a64) }, /* Motorola KRZR K1m */ \ | ||
64 | { USB_DEVICE(0x22b8, 0x2c84) }, /* Motorola VE240 phone */ \ | ||
65 | { USB_DEVICE(0x22b8, 0x2c64) } /* Motorola V950 phone */ | ||
66 | DEVICE(moto_modem, MOTO_IDS); | ||
67 | |||
68 | /* HP4x (48/49) Generic Serial driver */ | ||
69 | #define HP4X_IDS() \ | ||
70 | { USB_DEVICE(0x03f0, 0x0121) } | ||
71 | DEVICE(hp4x, HP4X_IDS); | ||
72 | |||
73 | /* Suunto ANT+ USB Driver */ | ||
74 | #define SUUNTO_IDS() \ | ||
75 | { USB_DEVICE(0x0fcf, 0x1008) } | ||
76 | DEVICE(suunto, SUUNTO_IDS); | ||
77 | |||
78 | /* Siemens USB/MPI adapter */ | ||
79 | #define SIEMENS_IDS() \ | ||
80 | { USB_DEVICE(0x908, 0x0004) } | ||
81 | DEVICE(siemens_mpi, SIEMENS_IDS); | ||
82 | |||
83 | /* All of the above structures mushed into two lists */ | ||
84 | static struct usb_serial_driver * const serial_drivers[] = { | ||
85 | &zio_device, | ||
86 | &funsoft_device, | ||
87 | &flashloader_device, | ||
88 | &vivopay_device, | ||
89 | &moto_modem_device, | ||
90 | &hp4x_device, | ||
91 | &suunto_device, | ||
92 | &siemens_mpi_device, | ||
93 | NULL | ||
94 | }; | ||
95 | |||
96 | static const struct usb_device_id id_table[] = { | ||
97 | ZIO_IDS(), | ||
98 | FUNSOFT_IDS(), | ||
99 | FLASHLOADER_IDS(), | ||
100 | VIVOPAY_IDS(), | ||
101 | MOTO_IDS(), | ||
102 | HP4X_IDS(), | ||
103 | SUUNTO_IDS(), | ||
104 | SIEMENS_IDS(), | ||
105 | { }, | ||
106 | }; | ||
107 | MODULE_DEVICE_TABLE(usb, id_table); | ||
108 | |||
109 | module_usb_serial_driver(serial_drivers, id_table); | ||
110 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/usb/serial/vivopay-serial.c b/drivers/usb/serial/vivopay-serial.c deleted file mode 100644 index 6299526ff8c3..000000000000 --- a/drivers/usb/serial/vivopay-serial.c +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001-2005 Greg Kroah-Hartman (greg@kroah.com) | ||
3 | * Copyright (C) 2009 Outpost Embedded, LLC | ||
4 | */ | ||
5 | |||
6 | #include <linux/kernel.h> | ||
7 | #include <linux/init.h> | ||
8 | #include <linux/tty.h> | ||
9 | #include <linux/module.h> | ||
10 | #include <linux/usb.h> | ||
11 | #include <linux/usb/serial.h> | ||
12 | |||
13 | #define DRIVER_DESC "ViVOpay USB Serial Driver" | ||
14 | |||
15 | #define VIVOPAY_VENDOR_ID 0x1d5f | ||
16 | |||
17 | |||
18 | static struct usb_device_id id_table [] = { | ||
19 | /* ViVOpay 8800 */ | ||
20 | { USB_DEVICE(VIVOPAY_VENDOR_ID, 0x1004) }, | ||
21 | { }, | ||
22 | }; | ||
23 | |||
24 | MODULE_DEVICE_TABLE(usb, id_table); | ||
25 | |||
26 | static struct usb_serial_driver vivopay_serial_device = { | ||
27 | .driver = { | ||
28 | .owner = THIS_MODULE, | ||
29 | .name = "vivopay-serial", | ||
30 | }, | ||
31 | .id_table = id_table, | ||
32 | .num_ports = 1, | ||
33 | }; | ||
34 | |||
35 | static struct usb_serial_driver * const serial_drivers[] = { | ||
36 | &vivopay_serial_device, NULL | ||
37 | }; | ||
38 | |||
39 | module_usb_serial_driver(serial_drivers, id_table); | ||
40 | |||
41 | MODULE_AUTHOR("Forest Bond <forest.bond@outpostembedded.com>"); | ||
42 | MODULE_DESCRIPTION(DRIVER_DESC); | ||
43 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/usb/serial/zio.c b/drivers/usb/serial/zio.c deleted file mode 100644 index c043aa84a0ba..000000000000 --- a/drivers/usb/serial/zio.c +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /* | ||
2 | * ZIO Motherboard USB driver | ||
3 | * | ||
4 | * Copyright (C) 2010 Zilogic Systems <code@zilogic.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License version | ||
8 | * 2 as published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/tty.h> | ||
14 | #include <linux/module.h> | ||
15 | #include <linux/usb.h> | ||
16 | #include <linux/usb/serial.h> | ||
17 | #include <linux/uaccess.h> | ||
18 | |||
19 | static const struct usb_device_id id_table[] = { | ||
20 | { USB_DEVICE(0x1CBE, 0x0103) }, | ||
21 | { }, | ||
22 | }; | ||
23 | MODULE_DEVICE_TABLE(usb, id_table); | ||
24 | |||
25 | static struct usb_serial_driver zio_device = { | ||
26 | .driver = { | ||
27 | .owner = THIS_MODULE, | ||
28 | .name = "zio", | ||
29 | }, | ||
30 | .id_table = id_table, | ||
31 | .num_ports = 1, | ||
32 | }; | ||
33 | |||
34 | static struct usb_serial_driver * const serial_drivers[] = { | ||
35 | &zio_device, NULL | ||
36 | }; | ||
37 | |||
38 | module_usb_serial_driver(serial_drivers, id_table); | ||
39 | MODULE_LICENSE("GPL"); | ||