Go to the documentation of this file.
11 #ifndef __LINUX_SND_WM8903_H
12 #define __LINUX_SND_WM8903_H
18 #define WM8903_GPIO_CONFIG_ZERO 0x8000
23 #define WM8903_MICDET_THR_MASK 0x0030
24 #define WM8903_MICDET_THR_SHIFT 4
25 #define WM8903_MICDET_THR_WIDTH 2
26 #define WM8903_MICSHORT_THR_MASK 0x000C
27 #define WM8903_MICSHORT_THR_SHIFT 2
28 #define WM8903_MICSHORT_THR_WIDTH 2
29 #define WM8903_MICDET_ENA 0x0002
30 #define WM8903_MICDET_ENA_MASK 0x0002
31 #define WM8903_MICDET_ENA_SHIFT 1
32 #define WM8903_MICDET_ENA_WIDTH 1
33 #define WM8903_MICBIAS_ENA 0x0001
34 #define WM8903_MICBIAS_ENA_MASK 0x0001
35 #define WM8903_MICBIAS_ENA_SHIFT 0
36 #define WM8903_MICBIAS_ENA_WIDTH 1
43 #define WM8903_GPn_FN_GPIO_OUTPUT 0
44 #define WM8903_GPn_FN_BCLK 1
45 #define WM8903_GPn_FN_IRQ_OUTPT 2
46 #define WM8903_GPn_FN_GPIO_INPUT 3
47 #define WM8903_GPn_FN_MICBIAS_CURRENT_DETECT 4
48 #define WM8903_GPn_FN_MICBIAS_SHORT_DETECT 5
49 #define WM8903_GPn_FN_DMIC_LR_CLK_OUTPUT 6
50 #define WM8903_GPn_FN_FLL_LOCK_OUTPUT 8
51 #define WM8903_GPn_FN_FLL_CLOCK_OUTPUT 9
56 #define WM8903_GP1_FN_MASK 0x1F00
57 #define WM8903_GP1_FN_SHIFT 8
58 #define WM8903_GP1_FN_WIDTH 5
59 #define WM8903_GP1_DIR 0x0080
60 #define WM8903_GP1_DIR_MASK 0x0080
61 #define WM8903_GP1_DIR_SHIFT 7
62 #define WM8903_GP1_DIR_WIDTH 1
63 #define WM8903_GP1_OP_CFG 0x0040
64 #define WM8903_GP1_OP_CFG_MASK 0x0040
65 #define WM8903_GP1_OP_CFG_SHIFT 6
66 #define WM8903_GP1_OP_CFG_WIDTH 1
67 #define WM8903_GP1_IP_CFG 0x0020
68 #define WM8903_GP1_IP_CFG_MASK 0x0020
69 #define WM8903_GP1_IP_CFG_SHIFT 5
70 #define WM8903_GP1_IP_CFG_WIDTH 1
71 #define WM8903_GP1_LVL 0x0010
72 #define WM8903_GP1_LVL_MASK 0x0010
73 #define WM8903_GP1_LVL_SHIFT 4
74 #define WM8903_GP1_LVL_WIDTH 1
75 #define WM8903_GP1_PD 0x0008
76 #define WM8903_GP1_PD_MASK 0x0008
77 #define WM8903_GP1_PD_SHIFT 3
78 #define WM8903_GP1_PD_WIDTH 1
79 #define WM8903_GP1_PU 0x0004
80 #define WM8903_GP1_PU_MASK 0x0004
81 #define WM8903_GP1_PU_SHIFT 2
82 #define WM8903_GP1_PU_WIDTH 1
83 #define WM8903_GP1_INTMODE 0x0002
84 #define WM8903_GP1_INTMODE_MASK 0x0002
85 #define WM8903_GP1_INTMODE_SHIFT 1
86 #define WM8903_GP1_INTMODE_WIDTH 1
87 #define WM8903_GP1_DB 0x0001
88 #define WM8903_GP1_DB_MASK 0x0001
89 #define WM8903_GP1_DB_SHIFT 0
90 #define WM8903_GP1_DB_WIDTH 1
95 #define WM8903_GP2_FN_MASK 0x1F00
96 #define WM8903_GP2_FN_SHIFT 8
97 #define WM8903_GP2_FN_WIDTH 5
98 #define WM8903_GP2_DIR 0x0080
99 #define WM8903_GP2_DIR_MASK 0x0080
100 #define WM8903_GP2_DIR_SHIFT 7
101 #define WM8903_GP2_DIR_WIDTH 1
102 #define WM8903_GP2_OP_CFG 0x0040
103 #define WM8903_GP2_OP_CFG_MASK 0x0040
104 #define WM8903_GP2_OP_CFG_SHIFT 6
105 #define WM8903_GP2_OP_CFG_WIDTH 1
106 #define WM8903_GP2_IP_CFG 0x0020
107 #define WM8903_GP2_IP_CFG_MASK 0x0020
108 #define WM8903_GP2_IP_CFG_SHIFT 5
109 #define WM8903_GP2_IP_CFG_WIDTH 1
110 #define WM8903_GP2_LVL 0x0010
111 #define WM8903_GP2_LVL_MASK 0x0010
112 #define WM8903_GP2_LVL_SHIFT 4
113 #define WM8903_GP2_LVL_WIDTH 1
114 #define WM8903_GP2_PD 0x0008
115 #define WM8903_GP2_PD_MASK 0x0008
116 #define WM8903_GP2_PD_SHIFT 3
117 #define WM8903_GP2_PD_WIDTH 1
118 #define WM8903_GP2_PU 0x0004
119 #define WM8903_GP2_PU_MASK 0x0004
120 #define WM8903_GP2_PU_SHIFT 2
121 #define WM8903_GP2_PU_WIDTH 1
122 #define WM8903_GP2_INTMODE 0x0002
123 #define WM8903_GP2_INTMODE_MASK 0x0002
124 #define WM8903_GP2_INTMODE_SHIFT 1
125 #define WM8903_GP2_INTMODE_WIDTH 1
126 #define WM8903_GP2_DB 0x0001
127 #define WM8903_GP2_DB_MASK 0x0001
128 #define WM8903_GP2_DB_SHIFT 0
129 #define WM8903_GP2_DB_WIDTH 1
134 #define WM8903_GP3_FN_MASK 0x1F00
135 #define WM8903_GP3_FN_SHIFT 8
136 #define WM8903_GP3_FN_WIDTH 5
137 #define WM8903_GP3_DIR 0x0080
138 #define WM8903_GP3_DIR_MASK 0x0080
139 #define WM8903_GP3_DIR_SHIFT 7
140 #define WM8903_GP3_DIR_WIDTH 1
141 #define WM8903_GP3_OP_CFG 0x0040
142 #define WM8903_GP3_OP_CFG_MASK 0x0040
143 #define WM8903_GP3_OP_CFG_SHIFT 6
144 #define WM8903_GP3_OP_CFG_WIDTH 1
145 #define WM8903_GP3_IP_CFG 0x0020
146 #define WM8903_GP3_IP_CFG_MASK 0x0020
147 #define WM8903_GP3_IP_CFG_SHIFT 5
148 #define WM8903_GP3_IP_CFG_WIDTH 1
149 #define WM8903_GP3_LVL 0x0010
150 #define WM8903_GP3_LVL_MASK 0x0010
151 #define WM8903_GP3_LVL_SHIFT 4
152 #define WM8903_GP3_LVL_WIDTH 1
153 #define WM8903_GP3_PD 0x0008
154 #define WM8903_GP3_PD_MASK 0x0008
155 #define WM8903_GP3_PD_SHIFT 3
156 #define WM8903_GP3_PD_WIDTH 1
157 #define WM8903_GP3_PU 0x0004
158 #define WM8903_GP3_PU_MASK 0x0004
159 #define WM8903_GP3_PU_SHIFT 2
160 #define WM8903_GP3_PU_WIDTH 1
161 #define WM8903_GP3_INTMODE 0x0002
162 #define WM8903_GP3_INTMODE_MASK 0x0002
163 #define WM8903_GP3_INTMODE_SHIFT 1
164 #define WM8903_GP3_INTMODE_WIDTH 1
165 #define WM8903_GP3_DB 0x0001
166 #define WM8903_GP3_DB_MASK 0x0001
167 #define WM8903_GP3_DB_SHIFT 0
168 #define WM8903_GP3_DB_WIDTH 1
173 #define WM8903_GP4_FN_MASK 0x1F00
174 #define WM8903_GP4_FN_SHIFT 8
175 #define WM8903_GP4_FN_WIDTH 5
176 #define WM8903_GP4_DIR 0x0080
177 #define WM8903_GP4_DIR_MASK 0x0080
178 #define WM8903_GP4_DIR_SHIFT 7
179 #define WM8903_GP4_DIR_WIDTH 1
180 #define WM8903_GP4_OP_CFG 0x0040
181 #define WM8903_GP4_OP_CFG_MASK 0x0040
182 #define WM8903_GP4_OP_CFG_SHIFT 6
183 #define WM8903_GP4_OP_CFG_WIDTH 1
184 #define WM8903_GP4_IP_CFG 0x0020
185 #define WM8903_GP4_IP_CFG_MASK 0x0020
186 #define WM8903_GP4_IP_CFG_SHIFT 5
187 #define WM8903_GP4_IP_CFG_WIDTH 1
188 #define WM8903_GP4_LVL 0x0010
189 #define WM8903_GP4_LVL_MASK 0x0010
190 #define WM8903_GP4_LVL_SHIFT 4
191 #define WM8903_GP4_LVL_WIDTH 1
192 #define WM8903_GP4_PD 0x0008
193 #define WM8903_GP4_PD_MASK 0x0008
194 #define WM8903_GP4_PD_SHIFT 3
195 #define WM8903_GP4_PD_WIDTH 1
196 #define WM8903_GP4_PU 0x0004
197 #define WM8903_GP4_PU_MASK 0x0004
198 #define WM8903_GP4_PU_SHIFT 2
199 #define WM8903_GP4_PU_WIDTH 1
200 #define WM8903_GP4_INTMODE 0x0002
201 #define WM8903_GP4_INTMODE_MASK 0x0002
202 #define WM8903_GP4_INTMODE_SHIFT 1
203 #define WM8903_GP4_INTMODE_WIDTH 1
204 #define WM8903_GP4_DB 0x0001
205 #define WM8903_GP4_DB_MASK 0x0001
206 #define WM8903_GP4_DB_SHIFT 0
207 #define WM8903_GP4_DB_WIDTH 1
212 #define WM8903_GP5_FN_MASK 0x1F00
213 #define WM8903_GP5_FN_SHIFT 8
214 #define WM8903_GP5_FN_WIDTH 5
215 #define WM8903_GP5_DIR 0x0080
216 #define WM8903_GP5_DIR_MASK 0x0080
217 #define WM8903_GP5_DIR_SHIFT 7
218 #define WM8903_GP5_DIR_WIDTH 1
219 #define WM8903_GP5_OP_CFG 0x0040
220 #define WM8903_GP5_OP_CFG_MASK 0x0040
221 #define WM8903_GP5_OP_CFG_SHIFT 6
222 #define WM8903_GP5_OP_CFG_WIDTH 1
223 #define WM8903_GP5_IP_CFG 0x0020
224 #define WM8903_GP5_IP_CFG_MASK 0x0020
225 #define WM8903_GP5_IP_CFG_SHIFT 5
226 #define WM8903_GP5_IP_CFG_WIDTH 1
227 #define WM8903_GP5_LVL 0x0010
228 #define WM8903_GP5_LVL_MASK 0x0010
229 #define WM8903_GP5_LVL_SHIFT 4
230 #define WM8903_GP5_LVL_WIDTH 1
231 #define WM8903_GP5_PD 0x0008
232 #define WM8903_GP5_PD_MASK 0x0008
233 #define WM8903_GP5_PD_SHIFT 3
234 #define WM8903_GP5_PD_WIDTH 1
235 #define WM8903_GP5_PU 0x0004
236 #define WM8903_GP5_PU_MASK 0x0004
237 #define WM8903_GP5_PU_SHIFT 2
238 #define WM8903_GP5_PU_WIDTH 1
239 #define WM8903_GP5_INTMODE 0x0002
240 #define WM8903_GP5_INTMODE_MASK 0x0002
241 #define WM8903_GP5_INTMODE_SHIFT 1
242 #define WM8903_GP5_INTMODE_WIDTH 1
243 #define WM8903_GP5_DB 0x0001
244 #define WM8903_GP5_DB_MASK 0x0001
245 #define WM8903_GP5_DB_SHIFT 0
246 #define WM8903_GP5_DB_WIDTH 1
248 #define WM8903_NUM_GPIO 5