moto_modem.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Motorola USB Phone driver
  3. *
  4. * Copyright (C) 2008 Greg Kroah-Hartman <greg@kroah.com>
  5. *
  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.
  9. *
  10. * {sigh}
  11. * Motorola should be using the CDC ACM USB spec, but instead
  12. * they try to just "do their own thing"... This driver should handle a
  13. * few phones in which a basic "dumb serial connection" is needed to be
  14. * able to get a connection through to them.
  15. */
  16. #include <linux/kernel.h>
  17. #include <linux/init.h>
  18. #include <linux/tty.h>
  19. #include <linux/module.h>
  20. #include <linux/usb.h>
  21. #include <linux/usb/serial.h>
  22. static const struct usb_device_id id_table[] = {
  23. { USB_DEVICE(0x05c6, 0x3197) }, /* unknown Motorola phone */
  24. { USB_DEVICE(0x0c44, 0x0022) }, /* unknown Mororola phone */
  25. { USB_DEVICE(0x22b8, 0x2a64) }, /* Motorola KRZR K1m */
  26. { USB_DEVICE(0x22b8, 0x2c84) }, /* Motorola VE240 phone */
  27. { USB_DEVICE(0x22b8, 0x2c64) }, /* Motorola V950 phone */
  28. { },
  29. };
  30. MODULE_DEVICE_TABLE(usb, id_table);
  31. static struct usb_serial_driver moto_device = {
  32. .driver = {
  33. .owner = THIS_MODULE,
  34. .name = "moto-modem",
  35. },
  36. .id_table = id_table,
  37. .num_ports = 1,
  38. };
  39. static struct usb_serial_driver * const serial_drivers[] = {
  40. &moto_device, NULL
  41. };
  42. module_usb_serial_driver(serial_drivers, id_table);
  43. MODULE_LICENSE("GPL");