aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/wm831x-irq.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-05-13 16:53:45 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2012-05-20 11:27:06 -0400
commit4492c4c3ff7bbb5fd400f021532643a3493f0723 (patch)
tree8408561470ce43a3659c149901b2858f59d15da7 /drivers/mfd/wm831x-irq.c
parent6592ebb3979c1ec0e37eb06553ef5ce9d6f5f025 (diff)
mfd: Don't try to flag IRQ 0 as a wm831x wake source
If we've not got a primary IRQ we shouldn't be trying to flag IRQ 0 as a wake source. 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.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/mfd/wm831x-irq.c b/drivers/mfd/wm831x-irq.c
index bec4d0539160..2be9628074bd 100644
--- a/drivers/mfd/wm831x-irq.c
+++ b/drivers/mfd/wm831x-irq.c
@@ -565,17 +565,6 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq)
565 wm831x_set_bits(wm831x, WM831X_IRQ_CONFIG, 565 wm831x_set_bits(wm831x, WM831X_IRQ_CONFIG,
566 WM831X_IRQ_OD, i); 566 WM831X_IRQ_OD, i);
567 567
568 /* Try to flag /IRQ as a wake source; there are a number of
569 * unconditional wake sources in the PMIC so this isn't
570 * conditional but we don't actually care *too* much if it
571 * fails.
572 */
573 ret = enable_irq_wake(irq);
574 if (ret != 0) {
575 dev_warn(wm831x->dev, "Can't enable IRQ as wake source: %d\n",
576 ret);
577 }
578
579 wm831x->irq = irq; 568 wm831x->irq = irq;
580 569
581 /* Register them with genirq */ 570 /* Register them with genirq */
@@ -597,6 +586,18 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq)
597 } 586 }
598 587
599 if (irq) { 588 if (irq) {
589 /* Try to flag /IRQ as a wake source; there are a number of
590 * unconditional wake sources in the PMIC so this isn't
591 * conditional but we don't actually care *too* much if it
592 * fails.
593 */
594 ret = enable_irq_wake(irq);
595 if (ret != 0) {
596 dev_warn(wm831x->dev,
597 "Can't enable IRQ as wake source: %d\n",
598 ret);
599 }
600
600 ret = request_threaded_irq(irq, NULL, wm831x_irq_thread, 601 ret = request_threaded_irq(irq, NULL, wm831x_irq_thread,
601 IRQF_TRIGGER_LOW | IRQF_ONESHOT, 602 IRQF_TRIGGER_LOW | IRQF_ONESHOT,
602 "wm831x", wm831x); 603 "wm831x", wm831x);