vivopay-serial.c 949 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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_DESC "ViVOpay USB Serial Driver"
  12. #define VIVOPAY_VENDOR_ID 0x1d5f
  13. static struct usb_device_id id_table [] = {
  14. /* ViVOpay 8800 */
  15. { USB_DEVICE(VIVOPAY_VENDOR_ID, 0x1004) },
  16. { },
  17. };
  18. MODULE_DEVICE_TABLE(usb, id_table);
  19. static struct usb_serial_driver vivopay_serial_device = {
  20. .driver = {
  21. .owner = THIS_MODULE,
  22. .name = "vivopay-serial",
  23. },
  24. .id_table = id_table,
  25. .num_ports = 1,
  26. };
  27. static struct usb_serial_driver * const serial_drivers[] = {
  28. &vivopay_serial_device, NULL
  29. };
  30. module_usb_serial_driver(serial_drivers, id_table);
  31. MODULE_AUTHOR("Forest Bond <forest.bond@outpostembedded.com>");
  32. MODULE_DESCRIPTION(DRIVER_DESC);
  33. MODULE_LICENSE("GPL");