1 //==========================================================================
5 // Kernel driver for the eCos USB serial driver
7 //==========================================================================
8 //####ECOSGPLCOPYRIGHTBEGIN####
9 // -------------------------------------------
10 // This file is part of eCos, the Embedded Configurable Operating System.
12 // eCos is free software; you can redistribute it and/or modify it under
13 // the terms of the GNU General Public License as published by the Free
14 // Software Foundation; either version 2 or (at your option) any later version.
16 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
17 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 // You should have received a copy of the GNU General Public License along
22 // with eCos; if not, write to the Free Software Foundation, Inc.,
23 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
25 // As a special exception, if other files instantiate templates or use macros
26 // or inline functions from this file, or you compile this file and link it
27 // with other works to produce a work based on this file, this file does not
28 // by itself cause the resulting work to be covered by the GNU General Public
29 // License. However the source code for this file must still be made available
30 // in accordance with section (3) of the GNU General Public License.
32 // This exception does not invalidate any other reasons why a work based on
33 // this file might be covered by the GNU General Public License.
35 // -------------------------------------------
36 //####ECOSGPLCOPYRIGHTEND####
37 //===========================================================================
38 //#####DESCRIPTIONBEGIN####
40 // Author(s): Frank M. Pagliughi (fmp), SoRo Systems, Inc.
43 // Description: Kernel driver for the eCos USB serial driver
45 //####DESCRIPTIONEND####
46 //===========================================================================
48 #include <linux/kernel.h>
49 #include <linux/init.h>
50 #include <linux/tty.h>
51 #include <linux/module.h>
52 #include <linux/usb.h>
53 #include <linux/usb/serial.h>
55 #define VENDOR_ID 0xFFFF
58 static struct usb_device_id id_table[] = {
59 { USB_DEVICE(VENDOR_ID, PRODUCT_ID) },
63 MODULE_DEVICE_TABLE(usb, id_table);
65 static struct usb_driver ecos_usbserial_driver = {
66 .name = "ecos_usbserial",
67 .probe = usb_serial_probe,
68 .disconnect = usb_serial_disconnect,
72 static struct usb_serial_driver ecos_usbserial_device = {
75 .name = "ecos_usbserial",
78 .num_interrupt_in = NUM_DONT_CARE,
79 .num_bulk_in = NUM_DONT_CARE,
80 .num_bulk_out = NUM_DONT_CARE,
84 static int __init ecos_usbserial_init(void)
88 retval = usb_serial_register(&ecos_usbserial_device);
92 retval = usb_register(&ecos_usbserial_driver);
94 usb_serial_deregister(&ecos_usbserial_device);
101 static void __exit ecos_usbserial_exit(void)
103 usb_deregister(&ecos_usbserial_driver);
104 usb_serial_deregister(&ecos_usbserial_device);
107 module_init(ecos_usbserial_init);
108 module_exit(ecos_usbserial_exit);
110 MODULE_LICENSE("GPL");