diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-07-10 07:37:58 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-07-16 09:00:32 -0400 |
commit | e102befe7a254f7b827fecc19eba0c5af03d1bf3 (patch) | |
tree | a58b33f847999e9ee80146f008717059945d3bf5 /drivers/mfd/arizona-core.c | |
parent | 9cd9e289ddeb66fb571dfa83d36e15c6d4b33b4e (diff) |
mfd: Initial support for the WM5110
The WM5110 is a highly-integrated low-power audio system for smartphones,
tablets and other portable audio devices. It combines an advanced DSP
feature set with a flexible, high-performance audio hub CODEC.
The support is based on the Arizona core driver.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/arizona-core.c')
-rw-r--r-- | drivers/mfd/arizona-core.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c index b35680dcd8c1..6e70d3defc7e 100644 --- a/drivers/mfd/arizona-core.c +++ b/drivers/mfd/arizona-core.c | |||
@@ -273,6 +273,14 @@ static struct mfd_cell wm5102_devs[] = { | |||
273 | { .name = "wm5102-codec" }, | 273 | { .name = "wm5102-codec" }, |
274 | }; | 274 | }; |
275 | 275 | ||
276 | static struct mfd_cell wm5110_devs[] = { | ||
277 | { .name = "arizona-extcon" }, | ||
278 | { .name = "arizona-gpio" }, | ||
279 | { .name = "arizona-micsupp" }, | ||
280 | { .name = "arizona-pwm" }, | ||
281 | { .name = "wm5110-codec" }, | ||
282 | }; | ||
283 | |||
276 | int __devinit arizona_dev_init(struct arizona *arizona) | 284 | int __devinit arizona_dev_init(struct arizona *arizona) |
277 | { | 285 | { |
278 | struct device *dev = arizona->dev; | 286 | struct device *dev = arizona->dev; |
@@ -291,6 +299,7 @@ int __devinit arizona_dev_init(struct arizona *arizona) | |||
291 | 299 | ||
292 | switch (arizona->type) { | 300 | switch (arizona->type) { |
293 | case WM5102: | 301 | case WM5102: |
302 | case WM5110: | ||
294 | for (i = 0; i < ARRAY_SIZE(wm5102_core_supplies); i++) | 303 | for (i = 0; i < ARRAY_SIZE(wm5102_core_supplies); i++) |
295 | arizona->core_supplies[i].supply | 304 | arizona->core_supplies[i].supply |
296 | = wm5102_core_supplies[i]; | 305 | = wm5102_core_supplies[i]; |
@@ -379,6 +388,17 @@ int __devinit arizona_dev_init(struct arizona *arizona) | |||
379 | ret = wm5102_patch(arizona); | 388 | ret = wm5102_patch(arizona); |
380 | break; | 389 | break; |
381 | #endif | 390 | #endif |
391 | #ifdef CONFIG_MFD_WM5110 | ||
392 | case 0x5110: | ||
393 | type_name = "WM5110"; | ||
394 | if (arizona->type != WM5110) { | ||
395 | dev_err(arizona->dev, "WM5110 registered as %d\n", | ||
396 | arizona->type); | ||
397 | arizona->type = WM5110; | ||
398 | } | ||
399 | ret = wm5110_patch(arizona); | ||
400 | break; | ||
401 | #endif | ||
382 | default: | 402 | default: |
383 | dev_err(arizona->dev, "Unknown device ID %x\n", reg); | 403 | dev_err(arizona->dev, "Unknown device ID %x\n", reg); |
384 | goto err_reset; | 404 | goto err_reset; |
@@ -494,6 +514,10 @@ int __devinit arizona_dev_init(struct arizona *arizona) | |||
494 | ret = mfd_add_devices(arizona->dev, -1, wm5102_devs, | 514 | ret = mfd_add_devices(arizona->dev, -1, wm5102_devs, |
495 | ARRAY_SIZE(wm5102_devs), NULL, 0); | 515 | ARRAY_SIZE(wm5102_devs), NULL, 0); |
496 | break; | 516 | break; |
517 | case WM5110: | ||
518 | ret = mfd_add_devices(arizona->dev, -1, wm5110_devs, | ||
519 | ARRAY_SIZE(wm5102_devs), NULL, 0); | ||
520 | break; | ||
497 | } | 521 | } |
498 | 522 | ||
499 | if (ret != 0) { | 523 | if (ret != 0) { |