io_tables.h 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. /*
  2. * IO Edgeport Driver tables
  3. *
  4. * Copyright (C) 2001
  5. * Greg Kroah-Hartman (greg@kroah.com)
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. */
  13. #ifndef IO_TABLES_H
  14. #define IO_TABLES_H
  15. static const struct usb_device_id edgeport_2port_id_table[] = {
  16. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2) },
  17. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2I) },
  18. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_421) },
  19. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_21) },
  20. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2_DIN) },
  21. { }
  22. };
  23. static const struct usb_device_id edgeport_4port_id_table[] = {
  24. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4) },
  25. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_RAPIDPORT_4) },
  26. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4T) },
  27. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_MT4X56USB) },
  28. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4I) },
  29. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU) },
  30. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4_DIN) },
  31. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_22I) },
  32. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_412_4) },
  33. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_COMPATIBLE) },
  34. { }
  35. };
  36. static const struct usb_device_id edgeport_8port_id_table[] = {
  37. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8) },
  38. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU) },
  39. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8I) },
  40. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8R) },
  41. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8RR) },
  42. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_412_8) },
  43. { }
  44. };
  45. static const struct usb_device_id Epic_port_id_table[] = {
  46. { USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0202) },
  47. { USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0203) },
  48. { USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0310) },
  49. { USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0311) },
  50. { USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0312) },
  51. { USB_DEVICE(USB_VENDOR_ID_AXIOHM, AXIOHM_DEVICE_ID_EPIC_A758) },
  52. { USB_DEVICE(USB_VENDOR_ID_AXIOHM, AXIOHM_DEVICE_ID_EPIC_A794) },
  53. { USB_DEVICE(USB_VENDOR_ID_AXIOHM, AXIOHM_DEVICE_ID_EPIC_A225) },
  54. { }
  55. };
  56. /* Devices that this driver supports */
  57. static const struct usb_device_id id_table_combined[] = {
  58. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4) },
  59. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_RAPIDPORT_4) },
  60. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4T) },
  61. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_MT4X56USB) },
  62. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2) },
  63. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4I) },
  64. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2I) },
  65. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_421) },
  66. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_21) },
  67. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU) },
  68. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8) },
  69. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2_DIN) },
  70. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4_DIN) },
  71. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU) },
  72. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_22I) },
  73. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_412_4) },
  74. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_COMPATIBLE) },
  75. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8I) },
  76. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8R) },
  77. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8RR) },
  78. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_412_8) },
  79. { USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0202) },
  80. { USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0203) },
  81. { USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0310) },
  82. { USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0311) },
  83. { USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0312) },
  84. { USB_DEVICE(USB_VENDOR_ID_AXIOHM, AXIOHM_DEVICE_ID_EPIC_A758) },
  85. { USB_DEVICE(USB_VENDOR_ID_AXIOHM, AXIOHM_DEVICE_ID_EPIC_A794) },
  86. { USB_DEVICE(USB_VENDOR_ID_AXIOHM, AXIOHM_DEVICE_ID_EPIC_A225) },
  87. { } /* Terminating entry */
  88. };
  89. MODULE_DEVICE_TABLE(usb, id_table_combined);
  90. static struct usb_serial_driver edgeport_2port_device = {
  91. .driver = {
  92. .owner = THIS_MODULE,
  93. .name = "edgeport_2",
  94. },
  95. .description = "Edgeport 2 port adapter",
  96. .id_table = edgeport_2port_id_table,
  97. .num_ports = 2,
  98. .open = edge_open,
  99. .close = edge_close,
  100. .throttle = edge_throttle,
  101. .unthrottle = edge_unthrottle,
  102. .attach = edge_startup,
  103. .disconnect = edge_disconnect,
  104. .release = edge_release,
  105. .port_probe = edge_port_probe,
  106. .port_remove = edge_port_remove,
  107. .ioctl = edge_ioctl,
  108. .set_termios = edge_set_termios,
  109. .tiocmget = edge_tiocmget,
  110. .tiocmset = edge_tiocmset,
  111. .tiocmiwait = usb_serial_generic_tiocmiwait,
  112. .get_icount = usb_serial_generic_get_icount,
  113. .write = edge_write,
  114. .write_room = edge_write_room,
  115. .chars_in_buffer = edge_chars_in_buffer,
  116. .break_ctl = edge_break,
  117. .read_int_callback = edge_interrupt_callback,
  118. .read_bulk_callback = edge_bulk_in_callback,
  119. .write_bulk_callback = edge_bulk_out_data_callback,
  120. };
  121. static struct usb_serial_driver edgeport_4port_device = {
  122. .driver = {
  123. .owner = THIS_MODULE,
  124. .name = "edgeport_4",
  125. },
  126. .description = "Edgeport 4 port adapter",
  127. .id_table = edgeport_4port_id_table,
  128. .num_ports = 4,
  129. .open = edge_open,
  130. .close = edge_close,
  131. .throttle = edge_throttle,
  132. .unthrottle = edge_unthrottle,
  133. .attach = edge_startup,
  134. .disconnect = edge_disconnect,
  135. .release = edge_release,
  136. .port_probe = edge_port_probe,
  137. .port_remove = edge_port_remove,
  138. .ioctl = edge_ioctl,
  139. .set_termios = edge_set_termios,
  140. .tiocmget = edge_tiocmget,
  141. .tiocmset = edge_tiocmset,
  142. .tiocmiwait = usb_serial_generic_tiocmiwait,
  143. .get_icount = usb_serial_generic_get_icount,
  144. .write = edge_write,
  145. .write_room = edge_write_room,
  146. .chars_in_buffer = edge_chars_in_buffer,
  147. .break_ctl = edge_break,
  148. .read_int_callback = edge_interrupt_callback,
  149. .read_bulk_callback = edge_bulk_in_callback,
  150. .write_bulk_callback = edge_bulk_out_data_callback,
  151. };
  152. static struct usb_serial_driver edgeport_8port_device = {
  153. .driver = {
  154. .owner = THIS_MODULE,
  155. .name = "edgeport_8",
  156. },
  157. .description = "Edgeport 8 port adapter",
  158. .id_table = edgeport_8port_id_table,
  159. .num_ports = 8,
  160. .open = edge_open,
  161. .close = edge_close,
  162. .throttle = edge_throttle,
  163. .unthrottle = edge_unthrottle,
  164. .attach = edge_startup,
  165. .disconnect = edge_disconnect,
  166. .release = edge_release,
  167. .port_probe = edge_port_probe,
  168. .port_remove = edge_port_remove,
  169. .ioctl = edge_ioctl,
  170. .set_termios = edge_set_termios,
  171. .tiocmget = edge_tiocmget,
  172. .tiocmset = edge_tiocmset,
  173. .tiocmiwait = usb_serial_generic_tiocmiwait,
  174. .get_icount = usb_serial_generic_get_icount,
  175. .write = edge_write,
  176. .write_room = edge_write_room,
  177. .chars_in_buffer = edge_chars_in_buffer,
  178. .break_ctl = edge_break,
  179. .read_int_callback = edge_interrupt_callback,
  180. .read_bulk_callback = edge_bulk_in_callback,
  181. .write_bulk_callback = edge_bulk_out_data_callback,
  182. };
  183. static struct usb_serial_driver epic_device = {
  184. .driver = {
  185. .owner = THIS_MODULE,
  186. .name = "epic",
  187. },
  188. .description = "EPiC device",
  189. .id_table = Epic_port_id_table,
  190. .num_ports = 1,
  191. .open = edge_open,
  192. .close = edge_close,
  193. .throttle = edge_throttle,
  194. .unthrottle = edge_unthrottle,
  195. .attach = edge_startup,
  196. .disconnect = edge_disconnect,
  197. .release = edge_release,
  198. .port_probe = edge_port_probe,
  199. .port_remove = edge_port_remove,
  200. .ioctl = edge_ioctl,
  201. .set_termios = edge_set_termios,
  202. .tiocmget = edge_tiocmget,
  203. .tiocmset = edge_tiocmset,
  204. .tiocmiwait = usb_serial_generic_tiocmiwait,
  205. .get_icount = usb_serial_generic_get_icount,
  206. .write = edge_write,
  207. .write_room = edge_write_room,
  208. .chars_in_buffer = edge_chars_in_buffer,
  209. .break_ctl = edge_break,
  210. .read_int_callback = edge_interrupt_callback,
  211. .read_bulk_callback = edge_bulk_in_callback,
  212. .write_bulk_callback = edge_bulk_out_data_callback,
  213. };
  214. static struct usb_serial_driver * const serial_drivers[] = {
  215. &edgeport_2port_device, &edgeport_4port_device,
  216. &edgeport_8port_device, &epic_device, NULL
  217. };
  218. #endif