aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/wm5110-tables.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-09-26 13:00:29 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2012-09-28 17:57:28 -0400
commitda58deec69777c22ece2ef871054c0d3d04e3e63 (patch)
tree9c77de6c9e494fdc294a87fc0869b62e707af859 /drivers/mfd/wm5110-tables.c
parent46ae368bfc526a53ce9e516e3af051b2d7a7c24d (diff)
mfd: wm5110: Add register patches for revision B
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/wm5110-tables.c')
-rw-r--r--drivers/mfd/wm5110-tables.c96
1 files changed, 95 insertions, 1 deletions
diff --git a/drivers/mfd/wm5110-tables.c b/drivers/mfd/wm5110-tables.c
index bd8782c8896b..adda6b10b90d 100644
--- a/drivers/mfd/wm5110-tables.c
+++ b/drivers/mfd/wm5110-tables.c
@@ -133,15 +133,109 @@ static const struct reg_default wm5110_reva_patch[] = {
133 { 0x209, 0x002A }, 133 { 0x209, 0x002A },
134}; 134};
135 135
136static const struct reg_default wm5110_revb_patch[] = {
137 { 0x80, 0x3 },
138 { 0x36e, 0x0210 },
139 { 0x370, 0x0210 },
140 { 0x372, 0x0210 },
141 { 0x374, 0x0210 },
142 { 0x376, 0x0210 },
143 { 0x378, 0x0210 },
144 { 0x36d, 0x0028 },
145 { 0x36f, 0x0028 },
146 { 0x371, 0x0028 },
147 { 0x373, 0x0028 },
148 { 0x375, 0x0028 },
149 { 0x377, 0x0028 },
150 { 0x280, 0x2002 },
151 { 0x44, 0x20 },
152 { 0x45, 0x40 },
153 { 0x46, 0x60 },
154 { 0x47, 0x80 },
155 { 0x48, 0xa0 },
156 { 0x51, 0x13 },
157 { 0x52, 0x33 },
158 { 0x53, 0x53 },
159 { 0x54, 0x73 },
160 { 0x55, 0x93 },
161 { 0x56, 0xb3 },
162 { 0xc30, 0x3e3e },
163 { 0xc31, 0x3e },
164 { 0xc32, 0x3e3e },
165 { 0xc33, 0x3e3e },
166 { 0xc34, 0x3e3e },
167 { 0xc35, 0x3e3e },
168 { 0xc36, 0x3e3e },
169 { 0xc37, 0x3e3e },
170 { 0xc38, 0x3e3e },
171 { 0xc39, 0x3e3e },
172 { 0xc3a, 0x3e3e },
173 { 0xc3b, 0x3e3e },
174 { 0xc3c, 0x3e },
175 { 0x201, 0x18a5 },
176 { 0x202, 0x4100 },
177 { 0x460, 0x0c40 },
178 { 0x461, 0x8000 },
179 { 0x462, 0x0c41 },
180 { 0x463, 0x4820 },
181 { 0x464, 0x0c41 },
182 { 0x465, 0x4040 },
183 { 0x466, 0x0841 },
184 { 0x467, 0x3940 },
185 { 0x468, 0x0841 },
186 { 0x469, 0x2030 },
187 { 0x46a, 0x0842 },
188 { 0x46b, 0x1990 },
189 { 0x46c, 0x08c2 },
190 { 0x46d, 0x1450 },
191 { 0x46e, 0x08c6 },
192 { 0x46f, 0x1020 },
193 { 0x470, 0x08c6 },
194 { 0x471, 0x0cd0 },
195 { 0x472, 0x08c6 },
196 { 0x473, 0x0a30 },
197 { 0x474, 0x0442 },
198 { 0x475, 0x0660 },
199 { 0x476, 0x0446 },
200 { 0x477, 0x0510 },
201 { 0x478, 0x04c6 },
202 { 0x479, 0x0400 },
203 { 0x47a, 0x04ce },
204 { 0x47b, 0x0330 },
205 { 0x47c, 0x05df },
206 { 0x47d, 0x0001 },
207 { 0x47e, 0x07ff },
208 { 0x2db, 0x0a00 },
209 { 0x2dd, 0x0023 },
210 { 0x2df, 0x0102 },
211 { 0x2ef, 0x924 },
212 { 0x2f0, 0x924 },
213 { 0x2f1, 0x924 },
214 { 0x2f2, 0x924 },
215 { 0x2f3, 0x924 },
216 { 0x2f4, 0x924 },
217 { 0x2eb, 0x60 },
218 { 0x2ec, 0x60 },
219 { 0x2ed, 0x60 },
220 { 0x4f2, 0x33e },
221 { 0x458, 0x0000 },
222 { 0x15a, 0x0003 },
223 { 0x80, 0x0 },
224};
225
136/* We use a function so we can use ARRAY_SIZE() */ 226/* We use a function so we can use ARRAY_SIZE() */
137int wm5110_patch(struct arizona *arizona) 227int wm5110_patch(struct arizona *arizona)
138{ 228{
139 switch (arizona->rev) { 229 switch (arizona->rev) {
140 case 0: 230 case 0:
141 case 1:
142 return regmap_register_patch(arizona->regmap, 231 return regmap_register_patch(arizona->regmap,
143 wm5110_reva_patch, 232 wm5110_reva_patch,
144 ARRAY_SIZE(wm5110_reva_patch)); 233 ARRAY_SIZE(wm5110_reva_patch));
234 case 1:
235 return regmap_register_patch(arizona->regmap,
236 wm5110_revb_patch,
237 ARRAY_SIZE(wm5110_revb_patch));
238
145 default: 239 default:
146 return 0; 240 return 0;
147 } 241 }