io_tables.h
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:6k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  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 __devinitdata struct usb_device_id edgeport_1port_id_table [] = {
  16. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_PARALLEL_PORT) },
  17. { }
  18. };
  19. static __devinitdata struct usb_device_id edgeport_2port_id_table [] = {
  20. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2) },
  21. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2I) },
  22. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_421) },
  23. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_21) },
  24. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2_DIN) },
  25. { }
  26. };
  27. static __devinitdata struct usb_device_id edgeport_4port_id_table [] = {
  28. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4) },
  29. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_RAPIDPORT_4) },
  30. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4T) },
  31. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_MT4X56USB) },
  32. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4I) },
  33. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU) },
  34. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4_DIN) },
  35. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_COMPATIBLE) },
  36. { }
  37. };
  38. static __devinitdata struct usb_device_id edgeport_8port_id_table [] = {
  39. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8) },
  40. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU) },
  41. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8I) },
  42. { }
  43. };
  44. /* Devices that this driver supports */
  45. static __devinitdata struct usb_device_id id_table_combined [] = {
  46. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4) },
  47. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_RAPIDPORT_4) },
  48. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4T) },
  49. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_MT4X56USB) },
  50. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2) },
  51. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4I) },
  52. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2I) },
  53. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_PARALLEL_PORT) },
  54. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_421) },
  55. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_21) },
  56. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU) },
  57. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8) },
  58. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2_DIN) },
  59. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4_DIN) },
  60. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU) },
  61. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_COMPATIBLE) },
  62. { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8I) },
  63. { } /* Terminating entry */
  64. };
  65. MODULE_DEVICE_TABLE (usb, id_table_combined);
  66. static struct usb_serial_device_type edgeport_1port_device = {
  67. name: "Edgeport 1 port adapter",
  68. id_table: edgeport_1port_id_table,
  69. needs_interrupt_in: MUST_HAVE,
  70. needs_bulk_in: MUST_HAVE,
  71. needs_bulk_out: MUST_HAVE,
  72. num_interrupt_in: 1,
  73. num_bulk_in: 1,
  74. num_bulk_out: 1,
  75. num_ports: 1,
  76. open: edge_open,
  77. close: edge_close,
  78. throttle: edge_throttle,
  79. unthrottle: edge_unthrottle,
  80. startup: edge_startup,
  81. shutdown: edge_shutdown,
  82. ioctl: edge_ioctl,
  83. set_termios: edge_set_termios,
  84. write: edge_write,
  85. write_room: edge_write_room,
  86. chars_in_buffer: edge_chars_in_buffer,
  87. break_ctl: edge_break,
  88. };
  89. static struct usb_serial_device_type edgeport_2port_device = {
  90. name: "Edgeport 2 port adapter",
  91. id_table: edgeport_2port_id_table,
  92. needs_interrupt_in: MUST_HAVE,
  93. needs_bulk_in: MUST_HAVE,
  94. needs_bulk_out: MUST_HAVE,
  95. num_interrupt_in: 1,
  96. num_bulk_in: 1,
  97. num_bulk_out: 1,
  98. num_ports: 2,
  99. open: edge_open,
  100. close: edge_close,
  101. throttle: edge_throttle,
  102. unthrottle: edge_unthrottle,
  103. startup: edge_startup,
  104. shutdown: edge_shutdown,
  105. ioctl: edge_ioctl,
  106. set_termios: edge_set_termios,
  107. write: edge_write,
  108. write_room: edge_write_room,
  109. chars_in_buffer: edge_chars_in_buffer,
  110. break_ctl: edge_break,
  111. };
  112. static struct usb_serial_device_type edgeport_4port_device = {
  113. name: "Edgeport 4 port adapter",
  114. id_table: edgeport_4port_id_table,
  115. needs_interrupt_in: MUST_HAVE,
  116. needs_bulk_in: MUST_HAVE,
  117. needs_bulk_out: MUST_HAVE,
  118. num_interrupt_in: 1,
  119. num_bulk_in: 1,
  120. num_bulk_out: 1,
  121. num_ports: 4,
  122. open: edge_open,
  123. close: edge_close,
  124. throttle: edge_throttle,
  125. unthrottle: edge_unthrottle,
  126. startup: edge_startup,
  127. shutdown: edge_shutdown,
  128. ioctl: edge_ioctl,
  129. set_termios: edge_set_termios,
  130. write: edge_write,
  131. write_room: edge_write_room,
  132. chars_in_buffer: edge_chars_in_buffer,
  133. break_ctl: edge_break,
  134. };
  135. static struct usb_serial_device_type edgeport_8port_device = {
  136. name: "Edgeport 8 port adapter",
  137. id_table: edgeport_8port_id_table,
  138. needs_interrupt_in: MUST_HAVE,
  139. needs_bulk_in: MUST_HAVE,
  140. needs_bulk_out: MUST_HAVE,
  141. num_interrupt_in: 1,
  142. num_bulk_in: 1,
  143. num_bulk_out: 1,
  144. num_ports: 8,
  145. open: edge_open,
  146. close: edge_close,
  147. throttle: edge_throttle,
  148. unthrottle: edge_unthrottle,
  149. startup: edge_startup,
  150. shutdown: edge_shutdown,
  151. ioctl: edge_ioctl,
  152. set_termios: edge_set_termios,
  153. write: edge_write,
  154. write_room: edge_write_room,
  155. chars_in_buffer: edge_chars_in_buffer,
  156. break_ctl: edge_break,
  157. };
  158. #endif