11f923071SGreg Kroah-Hartman /* 21f923071SGreg Kroah-Hartman * USB Serial "Simple" driver 31f923071SGreg Kroah-Hartman * 41f923071SGreg Kroah-Hartman * Copyright (C) 2001-2006,2008,2013 Greg Kroah-Hartman <greg@kroah.com> 51f923071SGreg Kroah-Hartman * Copyright (C) 2005 Arthur Huillet (ahuillet@users.sf.net) 61f923071SGreg Kroah-Hartman * Copyright (C) 2005 Thomas Hergenhahn <thomas.hergenhahn@suse.de> 71f923071SGreg Kroah-Hartman * Copyright (C) 2009 Outpost Embedded, LLC 81f923071SGreg Kroah-Hartman * Copyright (C) 2010 Zilogic Systems <code@zilogic.com> 91f923071SGreg Kroah-Hartman * Copyright (C) 2013 Wei Shuai <cpuwolf@gmail.com> 101f923071SGreg Kroah-Hartman * Copyright (C) 2013 Linux Foundation 111f923071SGreg Kroah-Hartman * 121f923071SGreg Kroah-Hartman * This program is free software; you can redistribute it and/or 131f923071SGreg Kroah-Hartman * modify it under the terms of the GNU General Public License version 141f923071SGreg Kroah-Hartman * 2 as published by the Free Software Foundation. 151f923071SGreg Kroah-Hartman */ 161f923071SGreg Kroah-Hartman 171f923071SGreg Kroah-Hartman #include <linux/kernel.h> 181f923071SGreg Kroah-Hartman #include <linux/tty.h> 191f923071SGreg Kroah-Hartman #include <linux/module.h> 201f923071SGreg Kroah-Hartman #include <linux/usb.h> 211f923071SGreg Kroah-Hartman #include <linux/usb/serial.h> 221f923071SGreg Kroah-Hartman 231f923071SGreg Kroah-Hartman #define DEVICE(vendor, IDS) \ 241f923071SGreg Kroah-Hartman static const struct usb_device_id vendor##_id_table[] = { \ 251f923071SGreg Kroah-Hartman IDS(), \ 261f923071SGreg Kroah-Hartman { }, \ 271f923071SGreg Kroah-Hartman }; \ 281f923071SGreg Kroah-Hartman static struct usb_serial_driver vendor##_device = { \ 291f923071SGreg Kroah-Hartman .driver = { \ 301f923071SGreg Kroah-Hartman .owner = THIS_MODULE, \ 3168c91d37SYann Droneaud .name = #vendor, \ 321f923071SGreg Kroah-Hartman }, \ 331f923071SGreg Kroah-Hartman .id_table = vendor##_id_table, \ 341f923071SGreg Kroah-Hartman .num_ports = 1, \ 351f923071SGreg Kroah-Hartman }; 361f923071SGreg Kroah-Hartman 371f923071SGreg Kroah-Hartman 381f923071SGreg Kroah-Hartman /* ZIO Motherboard USB driver */ 391f923071SGreg Kroah-Hartman #define ZIO_IDS() \ 401f923071SGreg Kroah-Hartman { USB_DEVICE(0x1CBE, 0x0103) } 411f923071SGreg Kroah-Hartman DEVICE(zio, ZIO_IDS); 421f923071SGreg Kroah-Hartman 431f923071SGreg Kroah-Hartman /* Funsoft Serial USB driver */ 441f923071SGreg Kroah-Hartman #define FUNSOFT_IDS() \ 451f923071SGreg Kroah-Hartman { USB_DEVICE(0x1404, 0xcddc) } 461f923071SGreg Kroah-Hartman DEVICE(funsoft, FUNSOFT_IDS); 471f923071SGreg Kroah-Hartman 481f923071SGreg Kroah-Hartman /* Infineon Flashloader driver */ 491f923071SGreg Kroah-Hartman #define FLASHLOADER_IDS() \ 501f923071SGreg Kroah-Hartman { USB_DEVICE(0x8087, 0x0716) } 511f923071SGreg Kroah-Hartman DEVICE(flashloader, FLASHLOADER_IDS); 521f923071SGreg Kroah-Hartman 531f923071SGreg Kroah-Hartman /* ViVOpay USB Serial Driver */ 541f923071SGreg Kroah-Hartman #define VIVOPAY_IDS() \ 551f923071SGreg Kroah-Hartman { USB_DEVICE(0x1d5f, 0x1004) } /* ViVOpay 8800 */ 561f923071SGreg Kroah-Hartman DEVICE(vivopay, VIVOPAY_IDS); 571f923071SGreg Kroah-Hartman 581f923071SGreg Kroah-Hartman /* Motorola USB Phone driver */ 591f923071SGreg Kroah-Hartman #define MOTO_IDS() \ 601f923071SGreg Kroah-Hartman { USB_DEVICE(0x05c6, 0x3197) }, /* unknown Motorola phone */ \ 618b648f13SRoman Mindalev { USB_DEVICE(0x0c44, 0x0022) }, /* unknown Motorola phone */ \ 621f923071SGreg Kroah-Hartman { USB_DEVICE(0x22b8, 0x2a64) }, /* Motorola KRZR K1m */ \ 631f923071SGreg Kroah-Hartman { USB_DEVICE(0x22b8, 0x2c84) }, /* Motorola VE240 phone */ \ 641f923071SGreg Kroah-Hartman { USB_DEVICE(0x22b8, 0x2c64) } /* Motorola V950 phone */ 651f923071SGreg Kroah-Hartman DEVICE(moto_modem, MOTO_IDS); 661f923071SGreg Kroah-Hartman 671f923071SGreg Kroah-Hartman /* HP4x (48/49) Generic Serial driver */ 681f923071SGreg Kroah-Hartman #define HP4X_IDS() \ 691f923071SGreg Kroah-Hartman { USB_DEVICE(0x03f0, 0x0121) } 701f923071SGreg Kroah-Hartman DEVICE(hp4x, HP4X_IDS); 711f923071SGreg Kroah-Hartman 721f923071SGreg Kroah-Hartman /* Suunto ANT+ USB Driver */ 731f923071SGreg Kroah-Hartman #define SUUNTO_IDS() \ 742240c365SKristóf Ralovich { USB_DEVICE(0x0fcf, 0x1008) }, \ 752240c365SKristóf Ralovich { USB_DEVICE(0x0fcf, 0x1009) } /* Dynastream ANT USB-m Stick */ 761f923071SGreg Kroah-Hartman DEVICE(suunto, SUUNTO_IDS); 771f923071SGreg Kroah-Hartman 781f923071SGreg Kroah-Hartman /* Siemens USB/MPI adapter */ 791f923071SGreg Kroah-Hartman #define SIEMENS_IDS() \ 801f923071SGreg Kroah-Hartman { USB_DEVICE(0x908, 0x0004) } 811f923071SGreg Kroah-Hartman DEVICE(siemens_mpi, SIEMENS_IDS); 821f923071SGreg Kroah-Hartman 831f923071SGreg Kroah-Hartman /* All of the above structures mushed into two lists */ 841f923071SGreg Kroah-Hartman static struct usb_serial_driver * const serial_drivers[] = { 851f923071SGreg Kroah-Hartman &zio_device, 861f923071SGreg Kroah-Hartman &funsoft_device, 871f923071SGreg Kroah-Hartman &flashloader_device, 881f923071SGreg Kroah-Hartman &vivopay_device, 891f923071SGreg Kroah-Hartman &moto_modem_device, 901f923071SGreg Kroah-Hartman &hp4x_device, 911f923071SGreg Kroah-Hartman &suunto_device, 921f923071SGreg Kroah-Hartman &siemens_mpi_device, 931f923071SGreg Kroah-Hartman NULL 941f923071SGreg Kroah-Hartman }; 951f923071SGreg Kroah-Hartman 961f923071SGreg Kroah-Hartman static const struct usb_device_id id_table[] = { 971f923071SGreg Kroah-Hartman ZIO_IDS(), 981f923071SGreg Kroah-Hartman FUNSOFT_IDS(), 991f923071SGreg Kroah-Hartman FLASHLOADER_IDS(), 1001f923071SGreg Kroah-Hartman VIVOPAY_IDS(), 1011f923071SGreg Kroah-Hartman MOTO_IDS(), 1021f923071SGreg Kroah-Hartman HP4X_IDS(), 1031f923071SGreg Kroah-Hartman SUUNTO_IDS(), 1041f923071SGreg Kroah-Hartman SIEMENS_IDS(), 1051f923071SGreg Kroah-Hartman { }, 1061f923071SGreg Kroah-Hartman }; 1071f923071SGreg Kroah-Hartman MODULE_DEVICE_TABLE(usb, id_table); 1081f923071SGreg Kroah-Hartman 1091f923071SGreg Kroah-Hartman module_usb_serial_driver(serial_drivers, id_table); 1101f923071SGreg Kroah-Hartman MODULE_LICENSE("GPL"); 111