ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / drivers / usb / serial / io_tables.h
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 struct usb_device_id edgeport_1port_id_table [] = {
18         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_PARALLEL_PORT) },
19         { }
20 };
21
22 static struct usb_device_id edgeport_2port_id_table [] = {
23         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2) },
24         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2I) },
25         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_421) },
26         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_21) },
27         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2_DIN) },
28         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2) },
29         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2I) },
30         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_421) },
31         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_21) },
32         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2_DIN) },
33         { }
34 };
35
36 static struct usb_device_id edgeport_4port_id_table [] = {
37         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4) },
38         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_RAPIDPORT_4) },
39         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4T) },
40         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_MT4X56USB) },
41         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4I) },
42         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU) },
43         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4_DIN) },
44         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_COMPATIBLE) },
45         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4) },
46         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4T) },
47         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4I) },
48         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8_DUAL_CPU) },
49         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4_DIN) },
50         { }
51 };
52
53 static struct usb_device_id edgeport_8port_id_table [] = {
54         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8) },
55         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU) },
56         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8I) },
57         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8) },
58         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_16_DUAL_CPU) },
59         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8I) },
60         { }
61 };
62
63 /* Devices that this driver supports */
64 static struct usb_device_id id_table_combined [] = {
65         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4) },
66         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_RAPIDPORT_4) },
67         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4T) },
68         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_MT4X56USB) },
69         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2) },
70         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4I) },
71         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2I) },
72         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_PARALLEL_PORT) },
73         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_421) },
74         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_21) },
75         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU) },
76         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8) },
77         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2_DIN) },
78         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4_DIN) },
79         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU) },
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_BB_EDGEPORT_2) },
83         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2I) },
84         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_421) },
85         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_21) },
86         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2_DIN) },
87         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4) },
88         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4T) },
89         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4I) },
90         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8_DUAL_CPU) },
91         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4_DIN) },
92         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8) },
93         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_16_DUAL_CPU) },
94         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8I) },
95         { }                                                     /* Terminating entry */
96 };
97
98 MODULE_DEVICE_TABLE (usb, id_table_combined);
99
100 static struct usb_serial_device_type edgeport_1port_device = {
101         .owner                  = THIS_MODULE,
102         .name                   = "Edgeport 1 port adapter",
103         .short_name             = "edgeport_1",
104         .id_table               = edgeport_1port_id_table,
105         .num_interrupt_in       = 1,
106         .num_bulk_in            = 1,
107         .num_bulk_out           = 1,
108         .num_ports              = 1,
109         .open                   = edge_open,
110         .close                  = edge_close,
111         .throttle               = edge_throttle,
112         .unthrottle             = edge_unthrottle,
113         .attach                 = edge_startup,
114         .shutdown               = edge_shutdown,
115         .ioctl                  = edge_ioctl,
116         .set_termios            = edge_set_termios,
117         .tiocmget               = edge_tiocmget,
118         .tiocmset               = edge_tiocmset,
119         .write                  = edge_write,
120         .write_room             = edge_write_room,
121         .chars_in_buffer        = edge_chars_in_buffer,
122         .break_ctl              = edge_break,
123 };
124
125 static struct usb_serial_device_type edgeport_2port_device = {
126         .owner                  = THIS_MODULE,
127         .name                   = "Edgeport 2 port adapter",
128         .short_name             = "edgeport_2",
129         .id_table               = edgeport_2port_id_table,
130         .num_interrupt_in       = 1,
131         .num_bulk_in            = 1,
132         .num_bulk_out           = 1,
133         .num_ports              = 2,
134         .open                   = edge_open,
135         .close                  = edge_close,
136         .throttle               = edge_throttle,
137         .unthrottle             = edge_unthrottle,
138         .attach                 = edge_startup,
139         .shutdown               = edge_shutdown,
140         .ioctl                  = edge_ioctl,
141         .set_termios            = edge_set_termios,
142         .tiocmget               = edge_tiocmget,
143         .tiocmset               = edge_tiocmset,
144         .write                  = edge_write,
145         .write_room             = edge_write_room,
146         .chars_in_buffer        = edge_chars_in_buffer,
147         .break_ctl              = edge_break,
148 };
149
150 static struct usb_serial_device_type edgeport_4port_device = {
151         .owner                  = THIS_MODULE,
152         .name                   = "Edgeport 4 port adapter",
153         .short_name             = "edgeport_4",
154         .id_table               = edgeport_4port_id_table,
155         .num_interrupt_in       = 1,
156         .num_bulk_in            = 1,
157         .num_bulk_out           = 1,
158         .num_ports              = 4,
159         .open                   = edge_open,
160         .close                  = edge_close,
161         .throttle               = edge_throttle,
162         .unthrottle             = edge_unthrottle,
163         .attach                 = edge_startup,
164         .shutdown               = edge_shutdown,
165         .ioctl                  = edge_ioctl,
166         .set_termios            = edge_set_termios,
167         .tiocmget               = edge_tiocmget,
168         .tiocmset               = edge_tiocmset,
169         .write                  = edge_write,
170         .write_room             = edge_write_room,
171         .chars_in_buffer        = edge_chars_in_buffer,
172         .break_ctl              = edge_break,
173 };
174
175 static struct usb_serial_device_type edgeport_8port_device = {
176         .owner                  = THIS_MODULE,
177         .name                   = "Edgeport 8 port adapter",
178         .short_name             = "edgeport_8",
179         .id_table               = edgeport_8port_id_table,
180         .num_interrupt_in       = 1,
181         .num_bulk_in            = 1,
182         .num_bulk_out           = 1,
183         .num_ports              = 8,
184         .open                   = edge_open,
185         .close                  = edge_close,
186         .throttle               = edge_throttle,
187         .unthrottle             = edge_unthrottle,
188         .attach                 = edge_startup,
189         .shutdown               = edge_shutdown,
190         .ioctl                  = edge_ioctl,
191         .set_termios            = edge_set_termios,
192         .tiocmget               = edge_tiocmget,
193         .tiocmset               = edge_tiocmset,
194         .write                  = edge_write,
195         .write_room             = edge_write_room,
196         .chars_in_buffer        = edge_chars_in_buffer,
197         .break_ctl              = edge_break,
198 };
199
200 #endif
201