• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
14 #ifndef IO_TABLES_H
15 #define IO_TABLES_H
16 
17 static const struct usb_device_id edgeport_2port_id_table[] = {
18 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2) },
19 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2I) },
20 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_421) },
21 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_21) },
22 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2_DIN) },
23 	{ }
24 };
25 
26 static const struct usb_device_id edgeport_4port_id_table[] = {
27 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4) },
28 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_RAPIDPORT_4) },
29 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4T) },
30 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_MT4X56USB) },
31 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4I) },
32 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU) },
33 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4_DIN) },
34 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_22I) },
35 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_412_4) },
36 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_COMPATIBLE) },
37 	{ }
38 };
39 
40 static const struct usb_device_id edgeport_8port_id_table[] = {
41 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8) },
42 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU) },
43 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8I) },
44 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8R) },
45 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8RR) },
46 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_412_8) },
47 	{ }
48 };
49 
50 static const struct usb_device_id Epic_port_id_table[] = {
51 	{ USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0202) },
52 	{ USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0203) },
53 	{ USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0310) },
54 	{ USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0311) },
55 	{ USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0312) },
56 	{ USB_DEVICE(USB_VENDOR_ID_AXIOHM, AXIOHM_DEVICE_ID_EPIC_A758) },
57 	{ USB_DEVICE(USB_VENDOR_ID_AXIOHM, AXIOHM_DEVICE_ID_EPIC_A794) },
58 	{ USB_DEVICE(USB_VENDOR_ID_AXIOHM, AXIOHM_DEVICE_ID_EPIC_A225) },
59 	{ }
60 };
61 
62 /* Devices that this driver supports */
63 static const struct usb_device_id id_table_combined[] = {
64 	{ USB_DEVICE(USB_VENDOR_ID_ION,	ION_DEVICE_ID_EDGEPORT_4) },
65 	{ USB_DEVICE(USB_VENDOR_ID_ION,	ION_DEVICE_ID_RAPIDPORT_4) },
66 	{ USB_DEVICE(USB_VENDOR_ID_ION,	ION_DEVICE_ID_EDGEPORT_4T) },
67 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_MT4X56USB) },
68 	{ USB_DEVICE(USB_VENDOR_ID_ION,	ION_DEVICE_ID_EDGEPORT_2) },
69 	{ USB_DEVICE(USB_VENDOR_ID_ION,	ION_DEVICE_ID_EDGEPORT_4I) },
70 	{ USB_DEVICE(USB_VENDOR_ID_ION,	ION_DEVICE_ID_EDGEPORT_2I) },
71 	{ USB_DEVICE(USB_VENDOR_ID_ION,	ION_DEVICE_ID_EDGEPORT_421) },
72 	{ USB_DEVICE(USB_VENDOR_ID_ION,	ION_DEVICE_ID_EDGEPORT_21) },
73 	{ USB_DEVICE(USB_VENDOR_ID_ION,	ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU) },
74 	{ USB_DEVICE(USB_VENDOR_ID_ION,	ION_DEVICE_ID_EDGEPORT_8) },
75 	{ USB_DEVICE(USB_VENDOR_ID_ION,	ION_DEVICE_ID_EDGEPORT_2_DIN) },
76 	{ USB_DEVICE(USB_VENDOR_ID_ION,	ION_DEVICE_ID_EDGEPORT_4_DIN) },
77 	{ USB_DEVICE(USB_VENDOR_ID_ION,	ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU) },
78 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_22I) },
79 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_412_4) },
80 	{ USB_DEVICE(USB_VENDOR_ID_ION,	ION_DEVICE_ID_EDGEPORT_COMPATIBLE) },
81 	{ USB_DEVICE(USB_VENDOR_ID_ION,	ION_DEVICE_ID_EDGEPORT_8I) },
82 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8R) },
83 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8RR) },
84 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_412_8) },
85 	{ USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0202) },
86 	{ USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0203) },
87 	{ USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0310) },
88 	{ USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0311) },
89 	{ USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0312) },
90 	{ USB_DEVICE(USB_VENDOR_ID_AXIOHM, AXIOHM_DEVICE_ID_EPIC_A758) },
91 	{ USB_DEVICE(USB_VENDOR_ID_AXIOHM, AXIOHM_DEVICE_ID_EPIC_A794) },
92 	{ USB_DEVICE(USB_VENDOR_ID_AXIOHM, AXIOHM_DEVICE_ID_EPIC_A225) },
93 	{ } /* Terminating entry */
94 };
95 
96 MODULE_DEVICE_TABLE(usb, id_table_combined);
97 
98 static struct usb_driver io_driver = {
99 	.name =		"io_edgeport",
100 	.probe =	usb_serial_probe,
101 	.disconnect =	usb_serial_disconnect,
102 	.id_table =	id_table_combined,
103 };
104 
105 static struct usb_serial_driver edgeport_2port_device = {
106 	.driver = {
107 		.owner		= THIS_MODULE,
108 		.name		= "edgeport_2",
109 	},
110 	.description		= "Edgeport 2 port adapter",
111 	.id_table		= edgeport_2port_id_table,
112 	.num_ports		= 2,
113 	.open			= edge_open,
114 	.close			= edge_close,
115 	.throttle		= edge_throttle,
116 	.unthrottle		= edge_unthrottle,
117 	.attach			= edge_startup,
118 	.disconnect		= edge_disconnect,
119 	.release		= edge_release,
120 	.ioctl			= edge_ioctl,
121 	.set_termios		= edge_set_termios,
122 	.tiocmget		= edge_tiocmget,
123 	.tiocmset		= edge_tiocmset,
124 	.get_icount		= edge_get_icount,
125 	.write			= edge_write,
126 	.write_room		= edge_write_room,
127 	.chars_in_buffer	= edge_chars_in_buffer,
128 	.break_ctl		= edge_break,
129 	.read_int_callback	= edge_interrupt_callback,
130 	.read_bulk_callback	= edge_bulk_in_callback,
131 	.write_bulk_callback	= edge_bulk_out_data_callback,
132 };
133 
134 static struct usb_serial_driver edgeport_4port_device = {
135 	.driver = {
136 		.owner		= THIS_MODULE,
137 		.name		= "edgeport_4",
138 	},
139 	.description		= "Edgeport 4 port adapter",
140 	.id_table		= edgeport_4port_id_table,
141 	.num_ports		= 4,
142 	.open			= edge_open,
143 	.close			= edge_close,
144 	.throttle		= edge_throttle,
145 	.unthrottle		= edge_unthrottle,
146 	.attach			= edge_startup,
147 	.disconnect		= edge_disconnect,
148 	.release		= edge_release,
149 	.ioctl			= edge_ioctl,
150 	.set_termios		= edge_set_termios,
151 	.tiocmget		= edge_tiocmget,
152 	.tiocmset		= edge_tiocmset,
153 	.get_icount		= edge_get_icount,
154 	.write			= edge_write,
155 	.write_room		= edge_write_room,
156 	.chars_in_buffer	= edge_chars_in_buffer,
157 	.break_ctl		= edge_break,
158 	.read_int_callback	= edge_interrupt_callback,
159 	.read_bulk_callback	= edge_bulk_in_callback,
160 	.write_bulk_callback	= edge_bulk_out_data_callback,
161 };
162 
163 static struct usb_serial_driver edgeport_8port_device = {
164 	.driver = {
165 		.owner		= THIS_MODULE,
166 		.name		= "edgeport_8",
167 	},
168 	.description		= "Edgeport 8 port adapter",
169 	.id_table		= edgeport_8port_id_table,
170 	.num_ports		= 8,
171 	.open			= edge_open,
172 	.close			= edge_close,
173 	.throttle		= edge_throttle,
174 	.unthrottle		= edge_unthrottle,
175 	.attach			= edge_startup,
176 	.disconnect		= edge_disconnect,
177 	.release		= edge_release,
178 	.ioctl			= edge_ioctl,
179 	.set_termios		= edge_set_termios,
180 	.tiocmget		= edge_tiocmget,
181 	.tiocmset		= edge_tiocmset,
182 	.get_icount		= edge_get_icount,
183 	.write			= edge_write,
184 	.write_room		= edge_write_room,
185 	.chars_in_buffer	= edge_chars_in_buffer,
186 	.break_ctl		= edge_break,
187 	.read_int_callback	= edge_interrupt_callback,
188 	.read_bulk_callback	= edge_bulk_in_callback,
189 	.write_bulk_callback	= edge_bulk_out_data_callback,
190 };
191 
192 static struct usb_serial_driver epic_device = {
193 	.driver = {
194 		.owner		= THIS_MODULE,
195 		.name		= "epic",
196 	},
197 	.description		= "EPiC device",
198 	.id_table		= Epic_port_id_table,
199 	.num_ports		= 1,
200 	.open			= edge_open,
201 	.close			= edge_close,
202 	.throttle		= edge_throttle,
203 	.unthrottle		= edge_unthrottle,
204 	.attach			= edge_startup,
205 	.disconnect		= edge_disconnect,
206 	.release		= edge_release,
207 	.ioctl			= edge_ioctl,
208 	.set_termios		= edge_set_termios,
209 	.tiocmget		= edge_tiocmget,
210 	.tiocmset		= edge_tiocmset,
211 	.get_icount		= edge_get_icount,
212 	.write			= edge_write,
213 	.write_room		= edge_write_room,
214 	.chars_in_buffer	= edge_chars_in_buffer,
215 	.break_ctl		= edge_break,
216 	.read_int_callback	= edge_interrupt_callback,
217 	.read_bulk_callback	= edge_bulk_in_callback,
218 	.write_bulk_callback	= edge_bulk_out_data_callback,
219 };
220 
221 static struct usb_serial_driver * const serial_drivers[] = {
222 	&edgeport_2port_device, &edgeport_4port_device,
223 	&edgeport_8port_device, &epic_device, NULL
224 };
225 
226 #endif
227 
228