21 static const struct wm8350_reg_access {
25 } wm8350_reg_io_map[] = {
27 { 0xFFFF, 0xFFFF, 0x0000 },
28 { 0x7CFF, 0x0C00, 0x0000 },
29 { 0x007F, 0x0000, 0x0000 },
30 { 0xBE3B, 0xBE3B, 0x8000 },
31 { 0xFEF7, 0xFEF7, 0xF800 },
32 { 0x80FF, 0x80FF, 0x8000 },
33 { 0xFB0E, 0xFB0E, 0x0000 },
34 { 0x0000, 0x0000, 0x0000 },
35 { 0xE537, 0xE537, 0xFFFF },
36 { 0x0FF3, 0x0FF3, 0xFFFF },
37 { 0x008F, 0x008F, 0xFFFF },
38 { 0x6D3C, 0x6D3C, 0xFFFF },
39 { 0x1F8F, 0x1F8F, 0xFFFF },
40 { 0x8F3F, 0x8F3F, 0xFFFF },
41 { 0x0003, 0x0003, 0xFFFF },
42 { 0x0000, 0x0000, 0x0000 },
43 { 0x7F7F, 0x7F7F, 0xFFFF },
44 { 0x073F, 0x073F, 0xFFFF },
45 { 0x1F3F, 0x1F3F, 0xFFFF },
46 { 0x3FFF, 0x00FF, 0xFFFF },
47 { 0x7F7F, 0x7F7F, 0x0000 },
48 { 0x0F3F, 0x0F3F, 0x0000 },
49 { 0x1F3F, 0x1F3F, 0x0000 },
50 { 0xEF7F, 0xEA7F, 0xFFFF },
51 { 0x3BFF, 0x0000, 0xFFFF },
52 { 0xFEE7, 0x0000, 0xFFFF },
53 { 0x35FF, 0x0000, 0xFFFF },
54 { 0x0F3F, 0x0000, 0xFFFF },
55 { 0x0F3F, 0x0000, 0xFFFF },
56 { 0x8000, 0x0000, 0xFFFF },
57 { 0x1FFF, 0x0000, 0xFFFF },
58 { 0xEF7F, 0x0000, 0xFFFF },
59 { 0x3FFF, 0x3FFF, 0x0000 },
60 { 0xFEE7, 0xFEE7, 0x0000 },
61 { 0xF5FF, 0xF5FF, 0x0000 },
62 { 0x0F3F, 0x0F3F, 0x0000 },
63 { 0x0F3F, 0x0F3F, 0x0000 },
64 { 0x8000, 0x8000, 0x0000 },
65 { 0x1FFF, 0x1FFF, 0x0000 },
66 { 0xEF7F, 0xEF7F, 0x0000 },
67 { 0xC9F7, 0xC9F7, 0xFFFF },
68 { 0x8001, 0x8001, 0x0000 },
69 { 0xFFF7, 0xFFF7, 0xFFFF },
70 { 0xFBFF, 0xFBFF, 0x0000 },
71 { 0xFFFF, 0xFFFF, 0x0000 },
72 { 0x0033, 0x0033, 0x0000 },
73 { 0x0000, 0x0000, 0x0000 },
74 { 0x0000, 0x0000, 0x0000 },
75 { 0x3033, 0x3033, 0x0000 },
76 { 0x0000, 0x0000, 0x0000 },
77 { 0x81FF, 0x81FF, 0xFFFF },
78 { 0x81FF, 0x81FF, 0xFFFF },
79 { 0x0000, 0x0000, 0x0000 },
80 { 0x0FFF, 0x0FFF, 0xFFFF },
81 { 0x0017, 0x0017, 0x0000 },
82 { 0x0000, 0x0000, 0x0000 },
83 { 0x0000, 0x0000, 0x0000 },
84 { 0x0000, 0x0000, 0x0000 },
85 { 0x4000, 0x4000, 0x0000 },
86 { 0x7000, 0x7000, 0x0000 },
87 { 0x3C00, 0x3C00, 0x0000 },
88 { 0x0000, 0x0000, 0x0000 },
89 { 0x0000, 0x0000, 0x0000 },
90 { 0x0000, 0x0000, 0x0000 },
91 { 0x8303, 0x8303, 0xFFFF },
92 { 0x0000, 0x0000, 0x0000 },
93 { 0x81FF, 0x81FF, 0xFFFF },
94 { 0x81FF, 0x81FF, 0xFFFF },
95 { 0x0FFF, 0x0FFF, 0x0000 },
96 { 0x0000, 0x0000, 0x0000 },
97 { 0x0FFF, 0x0FFF, 0xFFFF },
98 { 0x0000, 0x0000, 0x0000 },
99 { 0x0707, 0x0707, 0xFFFF },
100 { 0xC0C0, 0xC0C0, 0xFFFF },
101 { 0xC09F, 0xC09F, 0xFFFF },
102 { 0x0000, 0x0000, 0x0000 },
103 { 0x0F15, 0x0F15, 0xFFFF },
104 { 0xC000, 0xC000, 0xFFFF },
105 { 0x03FF, 0x03FF, 0x0000 },
106 { 0x0000, 0x0000, 0x0000 },
107 { 0xE1FC, 0xE1FC, 0x8000 },
108 { 0xE1FC, 0xE1FC, 0x8000 },
109 { 0x0000, 0x0000, 0x0000 },
110 { 0x0000, 0x0000, 0x0000 },
111 { 0x0000, 0x0000, 0x0000 },
112 { 0x0000, 0x0000, 0x0000 },
113 { 0x0000, 0x0000, 0x0000 },
114 { 0x0000, 0x0000, 0x0000 },
115 { 0x9807, 0x9807, 0xFFFF },
116 { 0x980B, 0x980B, 0xFFFF },
117 { 0x0000, 0x0000, 0x0000 },
118 { 0x0000, 0x0000, 0x0000 },
119 { 0x8909, 0x8909, 0xFFFF },
120 { 0x9E07, 0x9E07, 0xFFFF },
121 { 0x0000, 0x0000, 0x0000 },
122 { 0x0000, 0x0000, 0x0000 },
123 { 0x0EEE, 0x0EEE, 0x0000 },
124 { 0xE0EE, 0xE0EE, 0x0000 },
125 { 0x0E0F, 0x0E0F, 0x0000 },
126 { 0xE0E1, 0xE0E1, 0x0000 },
127 { 0x800E, 0x800E, 0x0000 },
128 { 0x0000, 0x0000, 0x0000 },
129 { 0x0000, 0x0000, 0x0000 },
130 { 0x0000, 0x0000, 0x0000 },
131 { 0xE1FC, 0xE1FC, 0xFFFF },
132 { 0xE1FC, 0xE1FC, 0xFFFF },
133 { 0xE1FC, 0xE1FC, 0xFFFF },
134 { 0xE7FC, 0xE7FC, 0xFFFF },
135 { 0x0000, 0x0000, 0x0000 },
136 { 0x0000, 0x0000, 0x0000 },
137 { 0x0000, 0x0000, 0x0000 },
138 { 0x80E0, 0x80E0, 0xFFFF },
139 { 0xBF00, 0xBF00, 0x0000 },
140 { 0x00F1, 0x00F1, 0x0000 },
141 { 0x00F8, 0x00F8, 0x0000 },
142 { 0x40FB, 0x40FB, 0x0000 },
143 { 0x7C30, 0x7C30, 0x0000 },
144 { 0x0000, 0x0000, 0x0000 },
145 { 0x0000, 0x0000, 0x0000 },
146 { 0x0000, 0x0000, 0x0000 },
147 { 0x0000, 0x0000, 0x0000 },
148 { 0x0000, 0x0000, 0x0000 },
149 { 0x0000, 0x0000, 0x0000 },
150 { 0x0000, 0x0000, 0x0000 },
151 { 0x0000, 0x0000, 0x0000 },
152 { 0x0000, 0x0000, 0x0000 },
153 { 0x0000, 0x0000, 0x0000 },
154 { 0x0000, 0x0000, 0x0000 },
155 { 0x1FFF, 0x1FFF, 0x0000 },
156 { 0x1FFF, 0x1FFF, 0x0000 },
157 { 0x1FFF, 0x1FFF, 0x0000 },
158 { 0x1FFF, 0x1FFF, 0x0000 },
159 { 0x0000, 0x0000, 0x0000 },
160 { 0x00C0, 0x00C0, 0x0000 },
161 { 0x1FFF, 0x1FFF, 0x0000 },
162 { 0x1FFF, 0x1FFF, 0x0000 },
163 { 0x0000, 0x0000, 0x0000 },
164 { 0x0000, 0x0000, 0x0000 },
165 { 0x0000, 0x0000, 0x0000 },
166 { 0x0000, 0x0000, 0x0000 },
167 { 0xFFFF, 0xFFFF, 0x0000 },
168 { 0xFFFF, 0xFFFF, 0x0000 },
169 { 0xFFFF, 0xFFFF, 0x0000 },
170 { 0x000F, 0x000F, 0x0000 },
171 { 0xF0FF, 0xF0FF, 0xA000 },
172 { 0x3707, 0x3707, 0x0000 },
173 { 0x0000, 0x0000, 0x0000 },
174 { 0x0000, 0x0000, 0x0000 },
175 { 0x0000, 0x0000, 0x0000 },
176 { 0x0000, 0x0000, 0x0000 },
177 { 0x0000, 0x0000, 0x0000 },
178 { 0x0000, 0x0000, 0x0000 },
179 { 0x7FFF, 0x7000, 0xFFFF },
180 { 0x7FFF, 0x7000, 0xFFFF },
181 { 0x7FFF, 0x7000, 0xFFFF },
182 { 0x7FFF, 0x7000, 0xFFFF },
183 { 0x0FFF, 0x0000, 0xFFFF },
184 { 0x0FFF, 0x0000, 0xFFFF },
185 { 0x0FFF, 0x0000, 0xFFFF },
186 { 0x0FFF, 0x0000, 0xFFFF },
187 { 0x0000, 0x0000, 0x0000 },
188 { 0x0000, 0x0000, 0x0000 },
189 { 0x0000, 0x0000, 0x0000 },
190 { 0x000F, 0x000F, 0x0000 },
191 { 0xFFFF, 0xFFFF, 0x0000 },
192 { 0xFFFF, 0xFFFF, 0x0000 },
193 { 0xFFFF, 0xFFFF, 0x0000 },
194 { 0xFFFF, 0xFFFF, 0x0000 },
195 { 0xBFFF, 0xBFFF, 0x8000 },
196 { 0xFFFF, 0x4FFF, 0xB000 },
197 { 0x007F, 0x007F, 0x0000 },
198 { 0x0000, 0x0000, 0x0000 },
199 { 0x903F, 0x903F, 0xFFFF },
200 { 0xE333, 0xE333, 0xFFFF },
201 { 0x903F, 0x903F, 0xFFFF },
202 { 0xE333, 0xE333, 0xFFFF },
203 { 0x8F3F, 0x8F3F, 0xFFFF },
204 { 0x332D, 0x332D, 0x0000 },
205 { 0x002D, 0x002D, 0x0000 },
206 { 0x5177, 0x5177, 0x8000 },
207 { 0x047F, 0x047F, 0x0000 },
208 { 0xFFC0, 0xFFC0, 0x0000 },
209 { 0x737F, 0x737F, 0x0000 },
210 { 0x535B, 0x535B, 0x0000 },
211 { 0xFFC0, 0xFFC0, 0x0000 },
212 { 0x0000, 0x0000, 0x0000 },
213 { 0x047F, 0x047F, 0x0000 },
214 { 0xFFC0, 0xFFC0, 0x0000 },
215 { 0x737F, 0x737F, 0x0000 },
216 { 0x047F, 0x047F, 0x0000 },
217 { 0xFFC0, 0xFFC0, 0x0000 },
218 { 0x737F, 0x737F, 0x0000 },
219 { 0x535B, 0x535B, 0x0000 },
220 { 0xFFC0, 0xFFC0, 0x0000 },
221 { 0x0000, 0x0000, 0x0000 },
222 { 0x047F, 0x047F, 0x0000 },
223 { 0xFFC0, 0xFFC0, 0x0000 },
224 { 0x737F, 0x737F, 0x0000 },
225 { 0x0000, 0x0000, 0x0000 },
226 { 0xFFD3, 0xFFD3, 0x0000 },
227 { 0x441F, 0x441F, 0x0000 },
228 { 0xFFC0, 0xFFC0, 0x0000 },
229 { 0x331F, 0x331F, 0x0000 },
230 { 0x441F, 0x441F, 0x0000 },
231 { 0xFFC0, 0xFFC0, 0x0000 },
232 { 0x331F, 0x331F, 0x0000 },
233 { 0x441F, 0x441F, 0x0000 },
234 { 0xFFC0, 0xFFC0, 0x0000 },
235 { 0x331F, 0x331F, 0x0000 },
236 { 0x441F, 0x441F, 0x0000 },
237 { 0xFFC0, 0xFFC0, 0x0000 },
238 { 0x331F, 0x331F, 0x0000 },
239 { 0x0000, 0x0000, 0x0000 },
240 { 0x0000, 0x0000, 0x0000 },
241 { 0x0000, 0x0000, 0x0000 },
242 { 0x8F3F, 0x8F3F, 0x0000 },
243 { 0xFF3F, 0xE03F, 0x0000 },
244 { 0xEF2F, 0xE02F, 0x0000 },
245 { 0xF3FF, 0xB3FF, 0xc000 },
246 { 0xFFFF, 0xFFFF, 0x0000 },
247 { 0x09FF, 0x01FF, 0x0000 },
248 { 0x0000, 0x0000, 0x0000 },
249 { 0xFFFF, 0xFFFF, 0xFFFF },
250 { 0xFFFF, 0xFFFF, 0xFFFF },
251 { 0x0000, 0x0000, 0x0000 },
252 { 0x8F3F, 0x0000, 0xFFFF },
253 { 0x0000, 0x0000, 0xFFFF },
254 { 0x34FE, 0x0000, 0xFFFF },
255 { 0x0000, 0x0000, 0x0000 },
256 { 0x0000, 0x0000, 0x0000 },
257 { 0xFFFF, 0x1FFF, 0xFFFF },
258 { 0xFFFF, 0x1FFF, 0xFFFF },
259 { 0xFFFF, 0x1FFF, 0xFFFF },
260 { 0xFFFF, 0x1FFF, 0xFFFF },
261 { 0x0000, 0x0000, 0x0000 },
262 { 0x0000, 0x0000, 0x0000 },
263 { 0x0000, 0x0000, 0x0000 },
264 { 0x0000, 0x0000, 0x0000 },
265 { 0x0000, 0x0000, 0x0000 },
266 { 0x0000, 0x0000, 0x0000 },
267 { 0x0000, 0x0000, 0x0000 },
268 { 0x0000, 0x0000, 0x0000 },
269 { 0x0000, 0x0000, 0x0000 },
270 { 0x0000, 0x0000, 0x0000 },
271 { 0x0000, 0x0000, 0x0000 },
272 { 0x0000, 0x0000, 0x0000 },
273 { 0x0000, 0x0000, 0x0000 },
274 { 0x0000, 0x0000, 0x0000 },
275 { 0xFFFF, 0x0010, 0xFFFF },
276 { 0x0000, 0x0000, 0x0000 },
277 { 0xFFFF, 0x0010, 0xFFFF },
278 { 0xFFFF, 0x0010, 0xFFFF },
279 { 0x0000, 0x0000, 0x0000 },
280 { 0xFFFF, 0x0010, 0xFFFF },
281 { 0x0000, 0x0000, 0x0000 },
282 { 0x0000, 0x0000, 0x0000 },
285 static bool wm8350_readable(
struct device *
dev,
unsigned int reg)
287 return wm8350_reg_io_map[
reg].readable;
290 static bool wm8350_writeable(
struct device *
dev,
unsigned int reg)
302 return wm8350_reg_io_map[
reg].writable;
305 static bool wm8350_volatile(
struct device *dev,
unsigned int reg)
307 return wm8350_reg_io_map[
reg].vol;
310 static bool wm8350_precious(
struct device *dev,
unsigned int reg)
335 .readable_reg = wm8350_readable,
336 .writeable_reg = wm8350_writeable,
337 .volatile_reg = wm8350_volatile,
338 .precious_reg = wm8350_precious,