Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1220999

[PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up settings to parent

From Geert Uytterhoeven <geert+renesas@glider.be>
Newsgroups linux.kernel
Subject [PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up settings to parent
Date 2015-09-08 19:10 +0200
Message-ID <q6uz7-26l-5@gated-at.bofh.it> (permalink)
References <q6uz7-26l-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The renesas-intc-irqpin interrupt controller is cascaded to the GIC, but
its driver doesn't propagate wake-up settings to the parent interrupt
controller.

Since commit aec89ef72ba6c944 ("irqchip/gic: Enable SKIP_SET_WAKE and
MASK_ON_SUSPEND"), the GIC driver masks interrupts during suspend, and
wake-up through gpio-keys now fails on r8a7740/armadillo and
sh73a0/kzm9g.

Fix this by propagating wake-up settings to the parent interrupt
controller. There's no need to handle irq_set_irq_wake() failures, as
the renesas-intc-irqpin interrupt controller is always cascaded to a
GIC, and the GIC driver always sets SKIP_SET_WAKE since the
aforementioned commit.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/irqchip/irq-renesas-intc-irqpin.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c
index 0670ab4e3897bf61..457d22c09e352d56 100644
--- a/drivers/irqchip/irq-renesas-intc-irqpin.c
+++ b/drivers/irqchip/irq-renesas-intc-irqpin.c
@@ -283,6 +283,9 @@ static int intc_irqpin_irq_set_type(struct irq_data *d, unsigned int type)
 static int intc_irqpin_irq_set_wake(struct irq_data *d, unsigned int on)
 {
 	struct intc_irqpin_priv *p = irq_data_get_irq_chip_data(d);
+	int hw_irq = irqd_to_hwirq(d);
+
+	irq_set_irq_wake(p->irq[hw_irq].requested_irq, on);
 
 	if (!p->clk)
 		return 0;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up settings to parent Geert Uytterhoeven <geert+renesas@glider.be> - 2015-09-08 19:10 +0200
  Re: [PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up  settings to parent Thomas Gleixner <tglx@linutronix.de> - 2015-09-08 21:10 +0200
    Re: [PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up  settings to parent Geert Uytterhoeven <geert@linux-m68k.org> - 2015-09-08 21:40 +0200
      Re: [PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up  settings to parent Thomas Gleixner <tglx@linutronix.de> - 2015-09-08 22:10 +0200
        Re: [PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up  settings to parent Grygorii Strashko <grygorii.strashko@ti.com> - 2015-09-09 10:50 +0200
          Re: [PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up  settings to parent Thomas Gleixner <tglx@linutronix.de> - 2015-09-09 11:00 +0200
            Re: [PATCH 1/2] irqchip: renesas-intc-irqpin: Propagate wake-up  settings to parent Grygorii Strashko <grygorii.strashko@ti.com> - 2015-09-09 11:20 +0200
  [tip:irq/urgent] irqchip/renesas-intc-irqpin:   Propagate wake-up settings to parent tip-bot for Geert Uytterhoeven <tipbot@zytor.com> - 2015-09-15 18:00 +0200

csiph-web