diff options
author | Wei Shuai <cpuwolf@gmail.com> | 2013-05-29 11:05:56 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-03 13:52:40 -0400 |
commit | 88f3ec2703e0dc22f08016671caed77e9c608f73 (patch) | |
tree | 8a99af837ee2b7708c7ac00046b9a57b58767d7e | |
parent | c1117afb85890adf4073c7ff18ebcb4d0495e6af (diff) |
USB: serial: add support Infineon modem USB flashloader driver
If you want to download Infineon modem via USB, this Infineon USB
flashloader driver is required.
Signed-off-by: Wei Shuai <cpuwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/serial/Kconfig | 10 | ||||
-rw-r--r-- | drivers/usb/serial/Makefile | 1 | ||||
-rw-r--r-- | drivers/usb/serial/flashloader.c | 39 |
3 files changed, 50 insertions, 0 deletions
diff --git a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig index 1d55762afbb1..8c3a42ea910c 100644 --- a/drivers/usb/serial/Kconfig +++ b/drivers/usb/serial/Kconfig | |||
@@ -710,6 +710,16 @@ config USB_SERIAL_QT2 | |||
710 | To compile this driver as a module, choose M here: the | 710 | To compile this driver as a module, choose M here: the |
711 | module will be called quatech-serial. | 711 | module will be called quatech-serial. |
712 | 712 | ||
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 | |||
713 | config USB_SERIAL_DEBUG | 723 | config USB_SERIAL_DEBUG |
714 | tristate "USB Debugging Device" | 724 | tristate "USB Debugging Device" |
715 | help | 725 | help |
diff --git a/drivers/usb/serial/Makefile b/drivers/usb/serial/Makefile index cec63fa19104..f7130114488f 100644 --- a/drivers/usb/serial/Makefile +++ b/drivers/usb/serial/Makefile | |||
@@ -65,3 +65,4 @@ obj-$(CONFIG_USB_SERIAL_VIVOPAY_SERIAL) += vivopay-serial.o | |||
65 | obj-$(CONFIG_USB_SERIAL_XSENS_MT) += xsens_mt.o | 65 | obj-$(CONFIG_USB_SERIAL_XSENS_MT) += xsens_mt.o |
66 | obj-$(CONFIG_USB_SERIAL_ZIO) += zio.o | 66 | obj-$(CONFIG_USB_SERIAL_ZIO) += zio.o |
67 | obj-$(CONFIG_USB_SERIAL_ZTE) += zte_ev.o | 67 | obj-$(CONFIG_USB_SERIAL_ZTE) += zte_ev.o |
68 | obj-$(CONFIG_USB_SERIAL_FLASHLOADER) += flashloader.o | ||
diff --git a/drivers/usb/serial/flashloader.c b/drivers/usb/serial/flashloader.c new file mode 100644 index 000000000000..e6f5c10e891c --- /dev/null +++ b/drivers/usb/serial/flashloader.c | |||
@@ -0,0 +1,39 @@ | |||
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"); | ||