sierra.c revision 69de51fdda3fd984541978313b66e4f2c44cc23e
1/* 2 * Sierra Wireless CDMA Wireless Serial USB driver 3 * 4 * Current Copy modified by: Kevin Lloyd <linux@sierrawireless.com> 5 * Original Copyright (C) 2005-2006 Greg Kroah-Hartman <gregkh@suse.de> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License version 9 * 2 as published by the Free Software Foundation. 10 */ 11 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 "usb-serial.h" 18 19static struct usb_device_id id_table [] = { 20 { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ 21 { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ 22 { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ 23 { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ 24 { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ 25 { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ 26 { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ 27 { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ 28 /* Following devices are supported in the airprime.c driver */ 29 /* { USB_DEVICE(0x1199, 0x0112) }, */ /* Sierra Wireless AirCard 580 */ 30 /* { USB_DEVICE(0x0F3D, 0x0112) }, */ /* AirPrime/Sierra PC 5220 */ 31 { } 32}; 33MODULE_DEVICE_TABLE(usb, id_table); 34 35static struct usb_driver sierra_driver = { 36 .name = "sierra_wireless", 37 .probe = usb_serial_probe, 38 .disconnect = usb_serial_disconnect, 39 .id_table = id_table, 40}; 41 42static struct usb_serial_driver sierra_device = { 43 .driver = { 44 .owner = THIS_MODULE, 45 .name = "Sierra_Wireless", 46 }, 47 .id_table = id_table, 48 .num_interrupt_in = NUM_DONT_CARE, 49 .num_bulk_in = NUM_DONT_CARE, 50 .num_bulk_out = NUM_DONT_CARE, 51 .num_ports = 3, 52}; 53 54static int __init sierra_init(void) 55{ 56 int retval; 57 58 retval = usb_serial_register(&sierra_device); 59 if (retval) 60 return retval; 61 retval = usb_register(&sierra_driver); 62 if (retval) 63 usb_serial_deregister(&sierra_device); 64 return retval; 65} 66 67static void __exit sierra_exit(void) 68{ 69 usb_deregister(&sierra_driver); 70 usb_serial_deregister(&sierra_device); 71} 72 73module_init(sierra_init); 74module_exit(sierra_exit); 75MODULE_LICENSE("GPL"); 76