aboutsummaryrefslogtreecommitdiffstats
path: root/include/pcmcia/device_id.h
blob: acf68656de3c864ccb32ee054d2142a4b75c205b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
/*
 * Copyright (2003-2004) 	Dominik Brodowski <linux@brodo.de>
 *				David Woodhouse
 *
 * License: GPL v2
 */

#define PCMCIA_DEVICE_MANF_CARD(manf, card) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_MANF_ID| \
			PCMCIA_DEV_ID_MATCH_CARD_ID, \
	.manf_id = (manf), \
	.card_id = (card), }

#define PCMCIA_DEVICE_FUNC_ID(func) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_FUNC_ID, \
	.func_id = (func), }

#define PCMCIA_DEVICE_PROD_ID1(v1, vh1) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1, \
	.prod_id = { (v1), NULL, NULL, NULL }, \
	.prod_id_hash = { (vh1), 0, 0, 0 }, }

#define PCMCIA_DEVICE_PROD_ID2(v2, vh2) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID2, \
	.prod_id = { NULL, (v2), NULL, NULL },  \
	.prod_id_hash = { 0, (vh2), 0, 0 }, }

#define PCMCIA_DEVICE_PROD_ID12(v1, v2, vh1, vh2) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
			PCMCIA_DEV_ID_MATCH_PROD_ID2, \
	.prod_id = { (v1), (v2), NULL, NULL }, \
	.prod_id_hash = { (vh1), (vh2), 0, 0 }, }

#define PCMCIA_DEVICE_PROD_ID13(v1, v3, vh1, vh3) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
			PCMCIA_DEV_ID_MATCH_PROD_ID3, \
	.prod_id = { (v1), NULL, (v3), NULL }, \
	.prod_id_hash = { (vh1), 0, (vh3), 0 }, }

#define PCMCIA_DEVICE_PROD_ID14(v1, v4, vh1, vh4) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
			PCMCIA_DEV_ID_MATCH_PROD_ID4, \
	.prod_id = { (v1), NULL, NULL, (v4) }, \
	.prod_id_hash = { (vh1), 0, 0, (vh4) }, }

#define PCMCIA_DEVICE_PROD_ID123(v1, v2, v3, vh1, vh2, vh3) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
			PCMCIA_DEV_ID_MATCH_PROD_ID2| \
			PCMCIA_DEV_ID_MATCH_PROD_ID3, \
	.prod_id = { (v1), (v2), (v3), NULL },\
	.prod_id_hash = { (vh1), (vh2), (vh3), 0 }, }

#define PCMCIA_DEVICE_PROD_ID124(v1, v2, v4, vh1, vh2, vh4) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
			PCMCIA_DEV_ID_MATCH_PROD_ID2| \
			PCMCIA_DEV_ID_MATCH_PROD_ID4, \
	.prod_id = { (v1), (v2), NULL, (v4) }, \
	.prod_id_hash = { (vh1), (vh2), 0, (vh4) }, }

#define PCMCIA_DEVICE_PROD_ID134(v1, v3, v4, vh1, vh3, vh4) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
			PCMCIA_DEV_ID_MATCH_PROD_ID3| \
			PCMCIA_DEV_ID_MATCH_PROD_ID4, \
	.prod_id = { (v1), NULL, (v3), (v4) }, \
	.prod_id_hash = { (vh1), 0, (vh3), (vh4) }, }

#define PCMCIA_DEVICE_PROD_ID1234(v1, v2, v3, v4, vh1, vh2, vh3, vh4) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
			PCMCIA_DEV_ID_MATCH_PROD_ID2| \
			PCMCIA_DEV_ID_MATCH_PROD_ID3| \
			PCMCIA_DEV_ID_MATCH_PROD_ID4, \
	.prod_id = { (v1), (v2), (v3), (v4) }, \
	.prod_id_hash = { (vh1), (vh2), (vh3), (vh4) }, }


/* multi-function devices */

#define PCMCIA_MFC_DEVICE_MANF_CARD(mfc, manf, card) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_MANF_ID| \
			PCMCIA_DEV_ID_MATCH_CARD_ID| \
			PCMCIA_DEV_ID_MATCH_FUNCTION, \
	.manf_id = (manf), \
	.card_id = (card), \
	.function = (mfc), }

#define PCMCIA_MFC_DEVICE_PROD_ID1(mfc, v1, vh1) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
			PCMCIA_DEV_ID_MATCH_FUNCTION, \
	.prod_id = { (v1), NULL, NULL, NULL }, \
	.prod_id_hash = { (vh1), 0, 0, 0 }, \
	.function = (mfc), }

#define PCMCIA_MFC_DEVICE_PROD_ID2(mfc, v2, vh2) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID2| \
			PCMCIA_DEV_ID_MATCH_FUNCTION, \
	.prod_id = { NULL, (v2), NULL, NULL },  \
	.prod_id_hash = { 0, (vh2), 0, 0 }, \
	.function = (mfc), }

#define PCMCIA_MFC_DEVICE_PROD_ID12(mfc, v1, v2, vh1, vh2) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
			PCMCIA_DEV_ID_MATCH_PROD_ID2| \
			PCMCIA_DEV_ID_MATCH_FUNCTION, \
	.prod_id = { (v1), (v2), NULL, NULL }, \
	.prod_id_hash = { (vh1), (vh2), 0, 0 }, \
	.function = (mfc), }

#define PCMCIA_MFC_DEVICE_PROD_ID13(mfc, v1, v3, vh1, vh3) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
			PCMCIA_DEV_ID_MATCH_PROD_ID3| \
			PCMCIA_DEV_ID_MATCH_FUNCTION, \
	.prod_id = { (v1), NULL, (v3), NULL }, \
	.prod_id_hash = { (vh1), 0, (vh3), 0 }, \
	.function = (mfc), }

#define PCMCIA_MFC_DEVICE_PROD_ID123(mfc, v1, v2, v3, vh1, vh2, vh3) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
			PCMCIA_DEV_ID_MATCH_PROD_ID2| \
			PCMCIA_DEV_ID_MATCH_PROD_ID3| \
			PCMCIA_DEV_ID_MATCH_FUNCTION, \
	.prod_id = { (v1), (v2), (v3), NULL },\
	.prod_id_hash = { (vh1), (vh2), (vh3), 0 }, \
	.function = (mfc), }

/* pseudo multi-function devices */

#define PCMCIA_PFC_DEVICE_MANF_CARD(mfc, manf, card) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_MANF_ID| \
			PCMCIA_DEV_ID_MATCH_CARD_ID| \
			PCMCIA_DEV_ID_MATCH_DEVICE_NO, \
	.manf_id = (manf), \
	.card_id = (card), \
	.device_no = (mfc), }

#define PCMCIA_PFC_DEVICE_PROD_ID1(mfc, v1, vh1) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
			PCMCIA_DEV_ID_MATCH_DEVICE_NO, \
	.prod_id = { (v1), NULL, NULL, NULL }, \
	.prod_id_hash = { (vh1), 0, 0, 0 }, \
	.device_no = (mfc), }

#define PCMCIA_PFC_DEVICE_PROD_ID2(mfc, v2, vh2) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID2| \
			PCMCIA_DEV_ID_MATCH_DEVICE_NO, \
	.prod_id = { NULL, (v2), NULL, NULL },  \
	.prod_id_hash = { 0, (vh2), 0, 0 }, \
	.device_no = (mfc), }

#define PCMCIA_PFC_DEVICE_PROD_ID12(mfc, v1, v2, vh1, vh2) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
			PCMCIA_DEV_ID_MATCH_PROD_ID2| \
			PCMCIA_DEV_ID_MATCH_DEVICE_NO, \
	.prod_id = { (v1), (v2), NULL, NULL }, \
	.prod_id_hash = { (vh1), (vh2), 0, 0 }, \
	.device_no = (mfc), }

#define PCMCIA_PFC_DEVICE_PROD_ID13(mfc, v1, v3, vh1, vh3) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
			PCMCIA_DEV_ID_MATCH_PROD_ID3| \
			PCMCIA_DEV_ID_MATCH_DEVICE_NO, \
	.prod_id = { (v1), NULL, (v3), NULL }, \
	.prod_id_hash = { (vh1), 0, (vh3), 0 }, \
	.device_no = (mfc), }

#define PCMCIA_PFC_DEVICE_PROD_ID123(mfc, v1, v2, v3, vh1, vh2, vh3) { \
	.match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
			PCMCIA_DEV_ID_MATCH_PROD_ID2| \
			PCMCIA_DEV_ID_MATCH_PROD_ID3| \
			PCMCIA_DEV_ID_MATCH_DEVICE_NO, \
	.prod_id = { (v1), (v2), (v3), NULL },\
	.prod_id_hash = { (vh1), (vh2), (vh3), 0 }, \
	.device_no = (mfc), }


#define PCMCIA_DEVICE_NULL { .match_flags = 0, }