sierra.c 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. #include <linux/kernel.h>
  12. #include <linux/init.h>
  13. #include <linux/tty.h>
  14. #include <linux/module.h>
  15. #include <linux/usb.h>
  16. #include <linux/usb/serial.h>
  17. static struct usb_device_id id_table [] = {
  18. { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */
  19. { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */
  20. { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */
  21. { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */
  22. { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */
  23. { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */
  24. { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */
  25. { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */
  26. /* Following devices are supported in the airprime.c driver */
  27. /* { USB_DEVICE(0x1199, 0x0112) }, */ /* Sierra Wireless AirCard 580 */
  28. /* { USB_DEVICE(0x0F3D, 0x0112) }, */ /* AirPrime/Sierra PC 5220 */
  29. { }
  30. };
  31. MODULE_DEVICE_TABLE(usb, id_table);
  32. static struct usb_driver sierra_driver = {
  33. .name = "sierra_wireless",
  34. .probe = usb_serial_probe,
  35. .disconnect = usb_serial_disconnect,
  36. .id_table = id_table,
  37. };
  38. static struct usb_serial_driver sierra_device = {
  39. .driver = {
  40. .owner = THIS_MODULE,
  41. .name = "Sierra_Wireless",
  42. },
  43. .id_table = id_table,
  44. .num_interrupt_in = NUM_DONT_CARE,
  45. .num_bulk_in = NUM_DONT_CARE,
  46. .num_bulk_out = NUM_DONT_CARE,
  47. .num_ports = 3,
  48. };
  49. static int __init sierra_init(void)
  50. {
  51. int retval;
  52. retval = usb_serial_register(&sierra_device);
  53. if (retval)
  54. return retval;
  55. retval = usb_register(&sierra_driver);
  56. if (retval)
  57. usb_serial_deregister(&sierra_device);
  58. return retval;
  59. }
  60. static void __exit sierra_exit(void)
  61. {
  62. usb_deregister(&sierra_driver);
  63. usb_serial_deregister(&sierra_device);
  64. }
  65. module_init(sierra_init);
  66. module_exit(sierra_exit);
  67. MODULE_LICENSE("GPL");