2 * USI WCDMA Modem driver
4 * Copyright (C) 2011 John Tseng
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.
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>
19 static int usi_probe(struct usb_interface *interface,
20 const struct usb_device_id *id);
22 static struct usb_device_id id_table [] = {
23 { USB_DEVICE(0x0e8d, 0x00a1) }, /* USI WCDMA modem 3COM */
24 { USB_DEVICE(0x0e8d, 0x00a2) }, /* USI WCDMA modem 2COM */
27 MODULE_DEVICE_TABLE(usb, id_table);
29 static struct usb_driver usi_driver = {
32 .disconnect = usb_serial_disconnect,
34 .suspend = usb_serial_suspend,
35 .resume = usb_serial_resume,
39 static struct usb_serial_driver usi_device = {
44 .usb_driver = &usi_driver,
49 static int usi_probe(struct usb_interface *interface,
50 const struct usb_device_id *id)
54 if_num = interface->altsetting->desc.bInterfaceNumber;
57 return usb_serial_probe(interface, id);
62 static int __init usi_init(void)
66 retval = usb_serial_register(&usi_device);
69 retval = usb_register(&usi_driver);
71 usb_serial_deregister(&usi_device);
75 static void __exit usi_exit(void)
77 usb_deregister(&usi_driver);
78 usb_serial_deregister(&usi_device);
81 module_init(usi_init);
82 module_exit(usi_exit);
83 MODULE_LICENSE("GPL");