aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/wm8994-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd/wm8994-core.c')
-rw-r--r--drivers/mfd/wm8994-core.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
index bfde4e8ec638..b03be1d4e0ca 100644
--- a/drivers/mfd/wm8994-core.c
+++ b/drivers/mfd/wm8994-core.c
@@ -167,6 +167,18 @@ static struct mfd_cell wm8994_devs[] = {
167 * and should be handled via the standard regulator API supply 167 * and should be handled via the standard regulator API supply
168 * management. 168 * management.
169 */ 169 */
170static const char *wm1811_main_supplies[] = {
171 "DBVDD1",
172 "DBVDD2",
173 "DBVDD3",
174 "DCVDD",
175 "AVDD1",
176 "AVDD2",
177 "CPVDD",
178 "SPKVDD1",
179 "SPKVDD2",
180};
181
170static const char *wm8994_main_supplies[] = { 182static const char *wm8994_main_supplies[] = {
171 "DBVDD", 183 "DBVDD",
172 "DCVDD", 184 "DCVDD",
@@ -329,6 +341,9 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
329 } 341 }
330 342
331 switch (wm8994->type) { 343 switch (wm8994->type) {
344 case WM1811:
345 wm8994->num_supplies = ARRAY_SIZE(wm1811_main_supplies);
346 break;
332 case WM8994: 347 case WM8994:
333 wm8994->num_supplies = ARRAY_SIZE(wm8994_main_supplies); 348 wm8994->num_supplies = ARRAY_SIZE(wm8994_main_supplies);
334 break; 349 break;
@@ -349,6 +364,10 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
349 } 364 }
350 365
351 switch (wm8994->type) { 366 switch (wm8994->type) {
367 case WM1811:
368 for (i = 0; i < ARRAY_SIZE(wm1811_main_supplies); i++)
369 wm8994->supplies[i].supply = wm1811_main_supplies[i];
370 break;
352 case WM8994: 371 case WM8994:
353 for (i = 0; i < ARRAY_SIZE(wm8994_main_supplies); i++) 372 for (i = 0; i < ARRAY_SIZE(wm8994_main_supplies); i++)
354 wm8994->supplies[i].supply = wm8994_main_supplies[i]; 373 wm8994->supplies[i].supply = wm8994_main_supplies[i];
@@ -382,6 +401,13 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
382 goto err_enable; 401 goto err_enable;
383 } 402 }
384 switch (ret) { 403 switch (ret) {
404 case 0x1811:
405 devname = "WM1811";
406 if (wm8994->type != WM1811)
407 dev_warn(wm8994->dev, "Device registered as type %d\n",
408 wm8994->type);
409 wm8994->type = WM1811;
410 break;
385 case 0x8994: 411 case 0x8994:
386 devname = "WM8994"; 412 devname = "WM8994";
387 if (wm8994->type != WM8994) 413 if (wm8994->type != WM8994)
@@ -539,6 +565,7 @@ static int wm8994_i2c_remove(struct i2c_client *i2c)
539} 565}
540 566
541static const struct i2c_device_id wm8994_i2c_id[] = { 567static const struct i2c_device_id wm8994_i2c_id[] = {
568 { "wm1811", WM1811 },
542 { "wm8994", WM8994 }, 569 { "wm8994", WM8994 },
543 { "wm8958", WM8958 }, 570 { "wm8958", WM8958 },
544 { } 571 { }