aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/wm831x-irq.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-04-03 22:59:57 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2011-05-26 13:45:19 -0400
commitbc86fcee373f27bffc9ed0c0a734e40ec084aef5 (patch)
tree572d2c525d560cd26a44aa703934bc12213e5943 /drivers/mfd/wm831x-irq.c
parent0b14c22ea1e0226d894df76176971d06e8886aa7 (diff)
mfd: Continue with IRQ setup even if we don't have PMIC main IRQ
The fact that we can't actually raise any interrupts doesn't stop us setting up the IRQs we're exporting. While this isn't actually going to do anything it allows us to proceed further through device setup during board bringup and avoids issues with the MFD core not letting us suppress the configuration of IRQ resources. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/wm831x-irq.c')
-rw-r--r--drivers/mfd/wm831x-irq.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/mfd/wm831x-irq.c b/drivers/mfd/wm831x-irq.c
index 23e66af89dea..42b928ec891e 100644
--- a/drivers/mfd/wm831x-irq.c
+++ b/drivers/mfd/wm831x-irq.c
@@ -515,12 +515,6 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq)
515 0xffff); 515 0xffff);
516 } 516 }
517 517
518 if (!irq) {
519 dev_warn(wm831x->dev,
520 "No interrupt specified - functionality limited\n");
521 return 0;
522 }
523
524 if (!pdata || !pdata->irq_base) { 518 if (!pdata || !pdata->irq_base) {
525 dev_err(wm831x->dev, 519 dev_err(wm831x->dev,
526 "No interrupt base specified, no interrupts\n"); 520 "No interrupt base specified, no interrupts\n");
@@ -567,15 +561,22 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq)
567#endif 561#endif
568 } 562 }
569 563
570 ret = request_threaded_irq(irq, NULL, wm831x_irq_thread, 564 if (irq) {
571 IRQF_TRIGGER_LOW | IRQF_ONESHOT, 565 ret = request_threaded_irq(irq, NULL, wm831x_irq_thread,
572 "wm831x", wm831x); 566 IRQF_TRIGGER_LOW | IRQF_ONESHOT,
573 if (ret != 0) { 567 "wm831x", wm831x);
574 dev_err(wm831x->dev, "Failed to request IRQ %d: %d\n", 568 if (ret != 0) {
575 irq, ret); 569 dev_err(wm831x->dev, "Failed to request IRQ %d: %d\n",
576 return ret; 570 irq, ret);
571 return ret;
572 }
573 } else {
574 dev_warn(wm831x->dev,
575 "No interrupt specified - functionality limited\n");
577 } 576 }
578 577
578
579
579 /* Enable top level interrupts, we mask at secondary level */ 580 /* Enable top level interrupts, we mask at secondary level */
580 wm831x_reg_write(wm831x, WM831X_SYSTEM_INTERRUPTS_MASK, 0); 581 wm831x_reg_write(wm831x, WM831X_SYSTEM_INTERRUPTS_MASK, 0);
581 582