| /* |
| * 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. |
| * |
| * This program is modifed to accommodate Telit UE910/HE910 modem. |
| */ |
| |
| #include <linux/kernel.h> |
| #include <linux/tty.h> |
| #include <linux/module.h> |
| #include <linux/usb.h> |
| #include <linux/usb/serial.h> |
| |
| #define DEVICE_N(vendor, IDS, nport) \ |
| static const struct usb_device_id vendor##_id_table[] = { \ |
| IDS(), \ |
| {}, \ |
| }; \ |
| static struct usb_serial_driver vendor##_device = { \ |
| .driver = { \ |
| .owner = THIS_MODULE, \ |
| .name = #vendor, \ |
| }, \ |
| .id_table = vendor##_id_table, \ |
| .num_ports = nport, \ |
| }; |
| |
| #define DEVICE(vendor, IDS) DEVICE_N(vendor, IDS, 1) |
| |
| /* Infineon Flashloader driver */ |
| #define FLASHLOADER_IDS() \ |
| { USB_DEVICE(0x058b, 0x0041) } |
| DEVICE(flashloader, FLASHLOADER_IDS); |
| |
| /* All of the above structures mushed into two lists */ |
| static struct usb_serial_driver * const serial_drivers[] = { |
| &flashloader_device, |
| NULL |
| }; |
| |
| static const struct usb_device_id id_table[] = { |
| FLASHLOADER_IDS(), |
| {}, |
| }; |
| MODULE_DEVICE_TABLE(usb, id_table); |
| |
| module_usb_serial_driver(serial_drivers, id_table); |
| MODULE_LICENSE("GPL"); |