Ath5k: lock beacons
[linux-2.6/mini2440.git] / include / pcmcia / device_id.h
blobe04e0b0d9a25a5b0c4903f3a51cab2af33de6d90
1 /*
2 * Copyright (2003-2004) Dominik Brodowski <linux@brodo.de>
3 * David Woodhouse
5 * License: GPL v2
6 */
8 #define PCMCIA_DEVICE_MANF_CARD(manf, card) { \
9 .match_flags = PCMCIA_DEV_ID_MATCH_MANF_ID| \
10 PCMCIA_DEV_ID_MATCH_CARD_ID, \
11 .manf_id = (manf), \
12 .card_id = (card), }
14 #define PCMCIA_DEVICE_FUNC_ID(func) { \
15 .match_flags = PCMCIA_DEV_ID_MATCH_FUNC_ID, \
16 .func_id = (func), }
18 #define PCMCIA_DEVICE_PROD_ID1(v1, vh1) { \
19 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1, \
20 .prod_id = { (v1), NULL, NULL, NULL }, \
21 .prod_id_hash = { (vh1), 0, 0, 0 }, }
23 #define PCMCIA_DEVICE_PROD_ID2(v2, vh2) { \
24 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID2, \
25 .prod_id = { NULL, (v2), NULL, NULL }, \
26 .prod_id_hash = { 0, (vh2), 0, 0 }, }
28 #define PCMCIA_DEVICE_PROD_ID12(v1, v2, vh1, vh2) { \
29 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
30 PCMCIA_DEV_ID_MATCH_PROD_ID2, \
31 .prod_id = { (v1), (v2), NULL, NULL }, \
32 .prod_id_hash = { (vh1), (vh2), 0, 0 }, }
34 #define PCMCIA_DEVICE_PROD_ID13(v1, v3, vh1, vh3) { \
35 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
36 PCMCIA_DEV_ID_MATCH_PROD_ID3, \
37 .prod_id = { (v1), NULL, (v3), NULL }, \
38 .prod_id_hash = { (vh1), 0, (vh3), 0 }, }
40 #define PCMCIA_DEVICE_PROD_ID14(v1, v4, vh1, vh4) { \
41 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
42 PCMCIA_DEV_ID_MATCH_PROD_ID4, \
43 .prod_id = { (v1), NULL, NULL, (v4) }, \
44 .prod_id_hash = { (vh1), 0, 0, (vh4) }, }
46 #define PCMCIA_DEVICE_PROD_ID123(v1, v2, v3, vh1, vh2, vh3) { \
47 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
48 PCMCIA_DEV_ID_MATCH_PROD_ID2| \
49 PCMCIA_DEV_ID_MATCH_PROD_ID3, \
50 .prod_id = { (v1), (v2), (v3), NULL },\
51 .prod_id_hash = { (vh1), (vh2), (vh3), 0 }, }
53 #define PCMCIA_DEVICE_PROD_ID124(v1, v2, v4, vh1, vh2, vh4) { \
54 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
55 PCMCIA_DEV_ID_MATCH_PROD_ID2| \
56 PCMCIA_DEV_ID_MATCH_PROD_ID4, \
57 .prod_id = { (v1), (v2), NULL, (v4) }, \
58 .prod_id_hash = { (vh1), (vh2), 0, (vh4) }, }
60 #define PCMCIA_DEVICE_PROD_ID134(v1, v3, v4, vh1, vh3, vh4) { \
61 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
62 PCMCIA_DEV_ID_MATCH_PROD_ID3| \
63 PCMCIA_DEV_ID_MATCH_PROD_ID4, \
64 .prod_id = { (v1), NULL, (v3), (v4) }, \
65 .prod_id_hash = { (vh1), 0, (vh3), (vh4) }, }
67 #define PCMCIA_DEVICE_PROD_ID1234(v1, v2, v3, v4, vh1, vh2, vh3, vh4) { \
68 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
69 PCMCIA_DEV_ID_MATCH_PROD_ID2| \
70 PCMCIA_DEV_ID_MATCH_PROD_ID3| \
71 PCMCIA_DEV_ID_MATCH_PROD_ID4, \
72 .prod_id = { (v1), (v2), (v3), (v4) }, \
73 .prod_id_hash = { (vh1), (vh2), (vh3), (vh4) }, }
75 #define PCMCIA_DEVICE_MANF_CARD_PROD_ID1(manf, card, v1, vh1) { \
76 .match_flags = PCMCIA_DEV_ID_MATCH_MANF_ID| \
77 PCMCIA_DEV_ID_MATCH_CARD_ID| \
78 PCMCIA_DEV_ID_MATCH_PROD_ID1, \
79 .manf_id = (manf), \
80 .card_id = (card), \
81 .prod_id = { (v1), NULL, NULL, NULL }, \
82 .prod_id_hash = { (vh1), 0, 0, 0 }, }
85 /* multi-function devices */
87 #define PCMCIA_MFC_DEVICE_MANF_CARD(mfc, manf, card) { \
88 .match_flags = PCMCIA_DEV_ID_MATCH_MANF_ID| \
89 PCMCIA_DEV_ID_MATCH_CARD_ID| \
90 PCMCIA_DEV_ID_MATCH_FUNCTION, \
91 .manf_id = (manf), \
92 .card_id = (card), \
93 .function = (mfc), }
95 #define PCMCIA_MFC_DEVICE_PROD_ID1(mfc, v1, vh1) { \
96 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
97 PCMCIA_DEV_ID_MATCH_FUNCTION, \
98 .prod_id = { (v1), NULL, NULL, NULL }, \
99 .prod_id_hash = { (vh1), 0, 0, 0 }, \
100 .function = (mfc), }
102 #define PCMCIA_MFC_DEVICE_PROD_ID2(mfc, v2, vh2) { \
103 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID2| \
104 PCMCIA_DEV_ID_MATCH_FUNCTION, \
105 .prod_id = { NULL, (v2), NULL, NULL }, \
106 .prod_id_hash = { 0, (vh2), 0, 0 }, \
107 .function = (mfc), }
109 #define PCMCIA_MFC_DEVICE_PROD_ID12(mfc, v1, v2, vh1, vh2) { \
110 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
111 PCMCIA_DEV_ID_MATCH_PROD_ID2| \
112 PCMCIA_DEV_ID_MATCH_FUNCTION, \
113 .prod_id = { (v1), (v2), NULL, NULL }, \
114 .prod_id_hash = { (vh1), (vh2), 0, 0 }, \
115 .function = (mfc), }
117 #define PCMCIA_MFC_DEVICE_PROD_ID13(mfc, v1, v3, vh1, vh3) { \
118 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
119 PCMCIA_DEV_ID_MATCH_PROD_ID3| \
120 PCMCIA_DEV_ID_MATCH_FUNCTION, \
121 .prod_id = { (v1), NULL, (v3), NULL }, \
122 .prod_id_hash = { (vh1), 0, (vh3), 0 }, \
123 .function = (mfc), }
125 #define PCMCIA_MFC_DEVICE_PROD_ID123(mfc, v1, v2, v3, vh1, vh2, vh3) { \
126 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
127 PCMCIA_DEV_ID_MATCH_PROD_ID2| \
128 PCMCIA_DEV_ID_MATCH_PROD_ID3| \
129 PCMCIA_DEV_ID_MATCH_FUNCTION, \
130 .prod_id = { (v1), (v2), (v3), NULL },\
131 .prod_id_hash = { (vh1), (vh2), (vh3), 0 }, \
132 .function = (mfc), }
134 /* pseudo multi-function devices */
136 #define PCMCIA_PFC_DEVICE_MANF_CARD(mfc, manf, card) { \
137 .match_flags = PCMCIA_DEV_ID_MATCH_MANF_ID| \
138 PCMCIA_DEV_ID_MATCH_CARD_ID| \
139 PCMCIA_DEV_ID_MATCH_DEVICE_NO, \
140 .manf_id = (manf), \
141 .card_id = (card), \
142 .device_no = (mfc), }
144 #define PCMCIA_PFC_DEVICE_PROD_ID1(mfc, v1, vh1) { \
145 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
146 PCMCIA_DEV_ID_MATCH_DEVICE_NO, \
147 .prod_id = { (v1), NULL, NULL, NULL }, \
148 .prod_id_hash = { (vh1), 0, 0, 0 }, \
149 .device_no = (mfc), }
151 #define PCMCIA_PFC_DEVICE_PROD_ID2(mfc, v2, vh2) { \
152 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID2| \
153 PCMCIA_DEV_ID_MATCH_DEVICE_NO, \
154 .prod_id = { NULL, (v2), NULL, NULL }, \
155 .prod_id_hash = { 0, (vh2), 0, 0 }, \
156 .device_no = (mfc), }
158 #define PCMCIA_PFC_DEVICE_PROD_ID12(mfc, v1, v2, vh1, vh2) { \
159 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
160 PCMCIA_DEV_ID_MATCH_PROD_ID2| \
161 PCMCIA_DEV_ID_MATCH_DEVICE_NO, \
162 .prod_id = { (v1), (v2), NULL, NULL }, \
163 .prod_id_hash = { (vh1), (vh2), 0, 0 }, \
164 .device_no = (mfc), }
166 #define PCMCIA_PFC_DEVICE_PROD_ID13(mfc, v1, v3, vh1, vh3) { \
167 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
168 PCMCIA_DEV_ID_MATCH_PROD_ID3| \
169 PCMCIA_DEV_ID_MATCH_DEVICE_NO, \
170 .prod_id = { (v1), NULL, (v3), NULL }, \
171 .prod_id_hash = { (vh1), 0, (vh3), 0 }, \
172 .device_no = (mfc), }
174 #define PCMCIA_PFC_DEVICE_PROD_ID123(mfc, v1, v2, v3, vh1, vh2, vh3) { \
175 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
176 PCMCIA_DEV_ID_MATCH_PROD_ID2| \
177 PCMCIA_DEV_ID_MATCH_PROD_ID3| \
178 PCMCIA_DEV_ID_MATCH_DEVICE_NO, \
179 .prod_id = { (v1), (v2), (v3), NULL },\
180 .prod_id_hash = { (vh1), (vh2), (vh3), 0 }, \
181 .device_no = (mfc), }
183 /* cards needing a CIS override */
185 #define PCMCIA_DEVICE_CIS_MANF_CARD(manf, card, _cisfile) { \
186 .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
187 PCMCIA_DEV_ID_MATCH_MANF_ID| \
188 PCMCIA_DEV_ID_MATCH_CARD_ID, \
189 .manf_id = (manf), \
190 .card_id = (card), \
191 .cisfile = (_cisfile)}
193 #define PCMCIA_DEVICE_CIS_PROD_ID12(v1, v2, vh1, vh2, _cisfile) { \
194 .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
195 PCMCIA_DEV_ID_MATCH_PROD_ID1| \
196 PCMCIA_DEV_ID_MATCH_PROD_ID2, \
197 .prod_id = { (v1), (v2), NULL, NULL }, \
198 .prod_id_hash = { (vh1), (vh2), 0, 0 }, \
199 .cisfile = (_cisfile)}
201 #define PCMCIA_DEVICE_CIS_PROD_ID123(v1, v2, v3, vh1, vh2, vh3, _cisfile) { \
202 .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
203 PCMCIA_DEV_ID_MATCH_PROD_ID1| \
204 PCMCIA_DEV_ID_MATCH_PROD_ID2| \
205 PCMCIA_DEV_ID_MATCH_PROD_ID3, \
206 .prod_id = { (v1), (v2), (v3), NULL },\
207 .prod_id_hash = { (vh1), (vh2), (vh3), 0 }, \
208 .cisfile = (_cisfile)}
211 #define PCMCIA_DEVICE_CIS_PROD_ID2(v2, vh2, _cisfile) { \
212 .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
213 PCMCIA_DEV_ID_MATCH_PROD_ID2, \
214 .prod_id = { NULL, (v2), NULL, NULL }, \
215 .prod_id_hash = { 0, (vh2), 0, 0 }, \
216 .cisfile = (_cisfile)}
218 #define PCMCIA_PFC_DEVICE_CIS_PROD_ID12(mfc, v1, v2, vh1, vh2, _cisfile) { \
219 .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
220 PCMCIA_DEV_ID_MATCH_PROD_ID1| \
221 PCMCIA_DEV_ID_MATCH_PROD_ID2| \
222 PCMCIA_DEV_ID_MATCH_DEVICE_NO, \
223 .prod_id = { (v1), (v2), NULL, NULL }, \
224 .prod_id_hash = { (vh1), (vh2), 0, 0 },\
225 .device_no = (mfc), \
226 .cisfile = (_cisfile)}
228 #define PCMCIA_MFC_DEVICE_CIS_MANF_CARD(mfc, manf, card, _cisfile) { \
229 .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
230 PCMCIA_DEV_ID_MATCH_MANF_ID| \
231 PCMCIA_DEV_ID_MATCH_CARD_ID| \
232 PCMCIA_DEV_ID_MATCH_FUNCTION, \
233 .manf_id = (manf), \
234 .card_id = (card), \
235 .function = (mfc), \
236 .cisfile = (_cisfile)}
238 #define PCMCIA_MFC_DEVICE_CIS_PROD_ID12(mfc, v1, v2, vh1, vh2, _cisfile) { \
239 .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
240 PCMCIA_DEV_ID_MATCH_PROD_ID1| \
241 PCMCIA_DEV_ID_MATCH_PROD_ID2| \
242 PCMCIA_DEV_ID_MATCH_FUNCTION, \
243 .prod_id = { (v1), (v2), NULL, NULL }, \
244 .prod_id_hash = { (vh1), (vh2), 0, 0 }, \
245 .function = (mfc), \
246 .cisfile = (_cisfile)}
248 #define PCMCIA_MFC_DEVICE_CIS_PROD_ID4(mfc, v4, vh4, _cisfile) { \
249 .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
250 PCMCIA_DEV_ID_MATCH_PROD_ID4| \
251 PCMCIA_DEV_ID_MATCH_FUNCTION, \
252 .prod_id = { NULL, NULL, NULL, (v4) }, \
253 .prod_id_hash = { 0, 0, 0, (vh4) }, \
254 .function = (mfc), \
255 .cisfile = (_cisfile)}
258 #define PCMCIA_DEVICE_NULL { .match_flags = 0, }