vivopay-serial.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright (C) 2001-2005 Greg Kroah-Hartman (greg@kroah.com)
  3. * Copyright (C) 2009 Outpost Embedded, LLC
  4. */
  5. #include <linux/kernel.h>
  6. #include <linux/init.h>
  7. #include <linux/tty.h>
  8. #include <linux/module.h>
  9. #include <linux/usb.h>
  10. #include <linux/usb/serial.h>
  11. #define DRIVER_VERSION "v1.0"
  12. #define DRIVER_DESC "ViVOpay USB Serial Driver"
  13. #define VIVOPAY_VENDOR_ID 0x1d5f
  14. static struct usb_device_id id_table [] = {
  15. /* ViVOpay 8800 */
  16. { USB_DEVICE(VIVOPAY_VENDOR_ID, 0x1004) },
  17. { },
  18. };
  19. MODULE_DEVICE_TABLE(usb, id_table);
  20. static struct usb_driver vivopay_serial_driver = {
  21. .name = "vivopay-serial",
  22. .probe = usb_serial_probe,
  23. .disconnect = usb_serial_disconnect,
  24. .id_table = id_table,
  25. };
  26. static struct usb_serial_driver vivopay_serial_device = {
  27. .driver = {
  28. .owner = THIS_MODULE,
  29. .name = "vivopay-serial",
  30. },
  31. .id_table = id_table,
  32. .num_ports = 1,
  33. };
  34. static struct usb_serial_driver * const serial_drivers[] = {
  35. &vivopay_serial_device, NULL
  36. };
  37. module_usb_serial_driver(vivopay_serial_driver, serial_drivers);
  38. MODULE_AUTHOR("Forest Bond <forest.bond@outpostembedded.com>");
  39. MODULE_DESCRIPTION(DRIVER_DESC);
  40. MODULE_VERSION(DRIVER_VERSION);
  41. MODULE_LICENSE("GPL");