diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-05-24 05:35:40 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-10-04 06:59:02 -0400 |
commit | b1f43bf3a52b085b786adf0b719712df574955f9 (patch) | |
tree | 7dc9c3fc6e742fa020f4e80b9598d71a3772e5ff /drivers/mfd/wm8994-core.c | |
parent | 11c2b5f2dc7ce42ddb779e1979d9defb02b70762 (diff) |
mfd: Add WM1811 support
The WM1811 is mostly register compatible with the WM8994 and WM8958,
providing a high performance audio hub CODEC in a small form factor
suitable for ultra compact system designs.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/wm8994-core.c')
-rw-r--r-- | drivers/mfd/wm8994-core.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index 96479c9b1728..7c13ab2c64a4 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c | |||
@@ -243,6 +243,18 @@ static struct mfd_cell wm8994_devs[] = { | |||
243 | * and should be handled via the standard regulator API supply | 243 | * and should be handled via the standard regulator API supply |
244 | * management. | 244 | * management. |
245 | */ | 245 | */ |
246 | static const char *wm1811_main_supplies[] = { | ||
247 | "DBVDD1", | ||
248 | "DBVDD2", | ||
249 | "DBVDD3", | ||
250 | "DCVDD", | ||
251 | "AVDD1", | ||
252 | "AVDD2", | ||
253 | "CPVDD", | ||
254 | "SPKVDD1", | ||
255 | "SPKVDD2", | ||
256 | }; | ||
257 | |||
246 | static const char *wm8994_main_supplies[] = { | 258 | static const char *wm8994_main_supplies[] = { |
247 | "DBVDD", | 259 | "DBVDD", |
248 | "DCVDD", | 260 | "DCVDD", |
@@ -401,6 +413,9 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq) | |||
401 | } | 413 | } |
402 | 414 | ||
403 | switch (wm8994->type) { | 415 | switch (wm8994->type) { |
416 | case WM1811: | ||
417 | wm8994->num_supplies = ARRAY_SIZE(wm1811_main_supplies); | ||
418 | break; | ||
404 | case WM8994: | 419 | case WM8994: |
405 | wm8994->num_supplies = ARRAY_SIZE(wm8994_main_supplies); | 420 | wm8994->num_supplies = ARRAY_SIZE(wm8994_main_supplies); |
406 | break; | 421 | break; |
@@ -421,6 +436,10 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq) | |||
421 | } | 436 | } |
422 | 437 | ||
423 | switch (wm8994->type) { | 438 | switch (wm8994->type) { |
439 | case WM1811: | ||
440 | for (i = 0; i < ARRAY_SIZE(wm1811_main_supplies); i++) | ||
441 | wm8994->supplies[i].supply = wm1811_main_supplies[i]; | ||
442 | break; | ||
424 | case WM8994: | 443 | case WM8994: |
425 | for (i = 0; i < ARRAY_SIZE(wm8994_main_supplies); i++) | 444 | for (i = 0; i < ARRAY_SIZE(wm8994_main_supplies); i++) |
426 | wm8994->supplies[i].supply = wm8994_main_supplies[i]; | 445 | wm8994->supplies[i].supply = wm8994_main_supplies[i]; |
@@ -454,6 +473,13 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq) | |||
454 | goto err_enable; | 473 | goto err_enable; |
455 | } | 474 | } |
456 | switch (ret) { | 475 | switch (ret) { |
476 | case 0x1811: | ||
477 | devname = "WM1811"; | ||
478 | if (wm8994->type != WM1811) | ||
479 | dev_warn(wm8994->dev, "Device registered as type %d\n", | ||
480 | wm8994->type); | ||
481 | wm8994->type = WM1811; | ||
482 | break; | ||
457 | case 0x8994: | 483 | case 0x8994: |
458 | devname = "WM8994"; | 484 | devname = "WM8994"; |
459 | if (wm8994->type != WM8994) | 485 | if (wm8994->type != WM8994) |
@@ -651,6 +677,7 @@ static int wm8994_i2c_remove(struct i2c_client *i2c) | |||
651 | } | 677 | } |
652 | 678 | ||
653 | static const struct i2c_device_id wm8994_i2c_id[] = { | 679 | static const struct i2c_device_id wm8994_i2c_id[] = { |
680 | { "wm1811", WM1811 }, | ||
654 | { "wm8994", WM8994 }, | 681 | { "wm8994", WM8994 }, |
655 | { "wm8958", WM8958 }, | 682 | { "wm8958", WM8958 }, |
656 | { } | 683 | { } |