aboutsummaryrefslogtreecommitdiffstats
path: root/include/pcmcia/device_id.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/pcmcia/device_id.h')
-rw-r--r--include/pcmcia/device_id.h249
1 files changed, 249 insertions, 0 deletions
diff --git a/include/pcmcia/device_id.h b/include/pcmcia/device_id.h
new file mode 100644
index 000000000000..346d81ece287
--- /dev/null
+++ b/include/pcmcia/device_id.h
@@ -0,0 +1,249 @@
1/*
2 * Copyright (2003-2004) Dominik Brodowski <linux@brodo.de>
3 * David Woodhouse
4 *
5 * License: GPL v2
6 */
7
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), }
13
14#define PCMCIA_DEVICE_FUNC_ID(func) { \
15 .match_flags = PCMCIA_DEV_ID_MATCH_FUNC_ID, \
16 .func_id = (func), }
17
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 }, }
22
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 }, }
27
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 }, }
33
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 }, }
39
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) }, }
45
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 }, }
52
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) }, }
59
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) }, }
66
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) }, }
74
75
76/* multi-function devices */
77
78#define PCMCIA_MFC_DEVICE_MANF_CARD(mfc, manf, card) { \
79 .match_flags = PCMCIA_DEV_ID_MATCH_MANF_ID| \
80 PCMCIA_DEV_ID_MATCH_CARD_ID| \
81 PCMCIA_DEV_ID_MATCH_FUNCTION, \
82 .manf_id = (manf), \
83 .card_id = (card), \
84 .function = (mfc), }
85
86#define PCMCIA_MFC_DEVICE_PROD_ID1(mfc, v1, vh1) { \
87 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
88 PCMCIA_DEV_ID_MATCH_FUNCTION, \
89 .prod_id = { (v1), NULL, NULL, NULL }, \
90 .prod_id_hash = { (vh1), 0, 0, 0 }, \
91 .function = (mfc), }
92
93#define PCMCIA_MFC_DEVICE_PROD_ID2(mfc, v2, vh2) { \
94 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID2| \
95 PCMCIA_DEV_ID_MATCH_FUNCTION, \
96 .prod_id = { NULL, (v2), NULL, NULL }, \
97 .prod_id_hash = { 0, (vh2), 0, 0 }, \
98 .function = (mfc), }
99
100#define PCMCIA_MFC_DEVICE_PROD_ID12(mfc, v1, v2, vh1, vh2) { \
101 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
102 PCMCIA_DEV_ID_MATCH_PROD_ID2| \
103 PCMCIA_DEV_ID_MATCH_FUNCTION, \
104 .prod_id = { (v1), (v2), NULL, NULL }, \
105 .prod_id_hash = { (vh1), (vh2), 0, 0 }, \
106 .function = (mfc), }
107
108#define PCMCIA_MFC_DEVICE_PROD_ID13(mfc, v1, v3, vh1, vh3) { \
109 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
110 PCMCIA_DEV_ID_MATCH_PROD_ID3| \
111 PCMCIA_DEV_ID_MATCH_FUNCTION, \
112 .prod_id = { (v1), NULL, (v3), NULL }, \
113 .prod_id_hash = { (vh1), 0, (vh3), 0 }, \
114 .function = (mfc), }
115
116#define PCMCIA_MFC_DEVICE_PROD_ID123(mfc, v1, v2, v3, vh1, vh2, vh3) { \
117 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
118 PCMCIA_DEV_ID_MATCH_PROD_ID2| \
119 PCMCIA_DEV_ID_MATCH_PROD_ID3| \
120 PCMCIA_DEV_ID_MATCH_FUNCTION, \
121 .prod_id = { (v1), (v2), (v3), NULL },\
122 .prod_id_hash = { (vh1), (vh2), (vh3), 0 }, \
123 .function = (mfc), }
124
125/* pseudo multi-function devices */
126
127#define PCMCIA_PFC_DEVICE_MANF_CARD(mfc, manf, card) { \
128 .match_flags = PCMCIA_DEV_ID_MATCH_MANF_ID| \
129 PCMCIA_DEV_ID_MATCH_CARD_ID| \
130 PCMCIA_DEV_ID_MATCH_DEVICE_NO, \
131 .manf_id = (manf), \
132 .card_id = (card), \
133 .device_no = (mfc), }
134
135#define PCMCIA_PFC_DEVICE_PROD_ID1(mfc, v1, vh1) { \
136 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
137 PCMCIA_DEV_ID_MATCH_DEVICE_NO, \
138 .prod_id = { (v1), NULL, NULL, NULL }, \
139 .prod_id_hash = { (vh1), 0, 0, 0 }, \
140 .device_no = (mfc), }
141
142#define PCMCIA_PFC_DEVICE_PROD_ID2(mfc, v2, vh2) { \
143 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID2| \
144 PCMCIA_DEV_ID_MATCH_DEVICE_NO, \
145 .prod_id = { NULL, (v2), NULL, NULL }, \
146 .prod_id_hash = { 0, (vh2), 0, 0 }, \
147 .device_no = (mfc), }
148
149#define PCMCIA_PFC_DEVICE_PROD_ID12(mfc, v1, v2, vh1, vh2) { \
150 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
151 PCMCIA_DEV_ID_MATCH_PROD_ID2| \
152 PCMCIA_DEV_ID_MATCH_DEVICE_NO, \
153 .prod_id = { (v1), (v2), NULL, NULL }, \
154 .prod_id_hash = { (vh1), (vh2), 0, 0 }, \
155 .device_no = (mfc), }
156
157#define PCMCIA_PFC_DEVICE_PROD_ID13(mfc, v1, v3, vh1, vh3) { \
158 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
159 PCMCIA_DEV_ID_MATCH_PROD_ID3| \
160 PCMCIA_DEV_ID_MATCH_DEVICE_NO, \
161 .prod_id = { (v1), NULL, (v3), NULL }, \
162 .prod_id_hash = { (vh1), 0, (vh3), 0 }, \
163 .device_no = (mfc), }
164
165#define PCMCIA_PFC_DEVICE_PROD_ID123(mfc, v1, v2, v3, vh1, vh2, vh3) { \
166 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
167 PCMCIA_DEV_ID_MATCH_PROD_ID2| \
168 PCMCIA_DEV_ID_MATCH_PROD_ID3| \
169 PCMCIA_DEV_ID_MATCH_DEVICE_NO, \
170 .prod_id = { (v1), (v2), (v3), NULL },\
171 .prod_id_hash = { (vh1), (vh2), (vh3), 0 }, \
172 .device_no = (mfc), }
173
174/* cards needing a CIS override */
175
176#define PCMCIA_DEVICE_CIS_MANF_CARD(manf, card, _cisfile) { \
177 .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
178 PCMCIA_DEV_ID_MATCH_MANF_ID| \
179 PCMCIA_DEV_ID_MATCH_CARD_ID, \
180 .manf_id = (manf), \
181 .card_id = (card), \
182 .cisfile = (_cisfile)}
183
184#define PCMCIA_DEVICE_CIS_PROD_ID12(v1, v2, vh1, vh2, _cisfile) { \
185 .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
186 PCMCIA_DEV_ID_MATCH_PROD_ID1| \
187 PCMCIA_DEV_ID_MATCH_PROD_ID2, \
188 .prod_id = { (v1), (v2), NULL, NULL }, \
189 .prod_id_hash = { (vh1), (vh2), 0, 0 }, \
190 .cisfile = (_cisfile)}
191
192#define PCMCIA_DEVICE_CIS_PROD_ID123(v1, v2, v3, vh1, vh2, vh3, _cisfile) { \
193 .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
194 PCMCIA_DEV_ID_MATCH_PROD_ID1| \
195 PCMCIA_DEV_ID_MATCH_PROD_ID2| \
196 PCMCIA_DEV_ID_MATCH_PROD_ID3, \
197 .prod_id = { (v1), (v2), (v3), NULL },\
198 .prod_id_hash = { (vh1), (vh2), (vh3), 0 }, \
199 .cisfile = (_cisfile)}
200
201
202#define PCMCIA_DEVICE_CIS_PROD_ID2(v2, vh2, _cisfile) { \
203 .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
204 PCMCIA_DEV_ID_MATCH_PROD_ID2, \
205 .prod_id = { NULL, (v2), NULL, NULL }, \
206 .prod_id_hash = { 0, (vh2), 0, 0 }, \
207 .cisfile = (_cisfile)}
208
209#define PCMCIA_PFC_DEVICE_CIS_PROD_ID12(mfc, v1, v2, vh1, vh2, _cisfile) { \
210 .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
211 PCMCIA_DEV_ID_MATCH_PROD_ID1| \
212 PCMCIA_DEV_ID_MATCH_PROD_ID2| \
213 PCMCIA_DEV_ID_MATCH_DEVICE_NO, \
214 .prod_id = { (v1), (v2), NULL, NULL }, \
215 .prod_id_hash = { (vh1), (vh2), 0, 0 },\
216 .device_no = (mfc), \
217 .cisfile = (_cisfile)}
218
219#define PCMCIA_MFC_DEVICE_CIS_MANF_CARD(mfc, manf, card, _cisfile) { \
220 .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
221 PCMCIA_DEV_ID_MATCH_MANF_ID| \
222 PCMCIA_DEV_ID_MATCH_CARD_ID| \
223 PCMCIA_DEV_ID_MATCH_FUNCTION, \
224 .manf_id = (manf), \
225 .card_id = (card), \
226 .function = (mfc), \
227 .cisfile = (_cisfile)}
228
229#define PCMCIA_MFC_DEVICE_CIS_PROD_ID12(mfc, v1, v2, vh1, vh2, _cisfile) { \
230 .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
231 PCMCIA_DEV_ID_MATCH_PROD_ID1| \
232 PCMCIA_DEV_ID_MATCH_PROD_ID2| \
233 PCMCIA_DEV_ID_MATCH_FUNCTION, \
234 .prod_id = { (v1), (v2), NULL, NULL }, \
235 .prod_id_hash = { (vh1), (vh2), 0, 0 }, \
236 .function = (mfc), \
237 .cisfile = (_cisfile)}
238
239#define PCMCIA_MFC_DEVICE_CIS_PROD_ID4(mfc, v4, vh4, _cisfile) { \
240 .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \
241 PCMCIA_DEV_ID_MATCH_PROD_ID4| \
242 PCMCIA_DEV_ID_MATCH_FUNCTION, \
243 .prod_id = { NULL, NULL, NULL, (v4) }, \
244 .prod_id_hash = { 0, 0, 0, (vh4) }, \
245 .function = (mfc), \
246 .cisfile = (_cisfile)}
247
248
249#define PCMCIA_DEVICE_NULL { .match_flags = 0, }