linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ludovic.Barre@st.com (Ludovic Barre)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 6/9] irqchip: stm32: move the wakeup on interrupt mask
Date: Mon, 6 Nov 2017 18:03:36 +0100	[thread overview]
Message-ID: <1509987819-29599-7-git-send-email-ludovic.Barre@st.com> (raw)
In-Reply-To: <1509987819-29599-1-git-send-email-ludovic.Barre@st.com>

From: Ludovic Barre <ludovic.barre@st.com>

Move irq_set_wake on interrupt mask, needed to wake up from
low power mode as the event mask is not able to do so.

Signed-off-by: Ludovic Barre <ludovic.barre@st.com>
---
 drivers/irqchip/irq-stm32-exti.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c
index 477d0fa..31ab0de 100644
--- a/drivers/irqchip/irq-stm32-exti.c
+++ b/drivers/irqchip/irq-stm32-exti.c
@@ -156,16 +156,16 @@ static int stm32_irq_set_wake(struct irq_data *data, unsigned int on)
 	struct irq_chip_generic *gc = irq_data_get_irq_chip_data(data);
 	const struct stm32_exti_bank *stm32_bank = gc->private;
 	int pin = data->hwirq % IRQS_PER_BANK;
-	u32 emr;
+	u32 imr;
 
 	irq_gc_lock(gc);
 
-	emr = irq_reg_readl(gc, stm32_bank->emr_ofst);
+	imr = irq_reg_readl(gc, stm32_bank->imr_ofst);
 	if (on)
-		emr |= BIT(pin);
+		imr |= BIT(pin);
 	else
-		emr &= ~BIT(pin);
-	irq_reg_writel(gc, emr, stm32_bank->emr_ofst);
+		imr &= ~BIT(pin);
+	irq_reg_writel(gc, imr, stm32_bank->imr_ofst);
 
 	irq_gc_unlock(gc);
 
-- 
2.7.4

  parent reply	other threads:[~2017-11-06 17:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-06 17:03 [PATCH v3 0/9] irqchip: stm32: add stm32h7 support Ludovic Barre
2017-11-06 17:03 ` [PATCH v3 1/9] irqchip: stm32: select GENERIC_IRQ_CHIP Ludovic Barre
2017-11-06 17:03 ` [PATCH v3 2/9] irqchip: stm32: add multi-bank management Ludovic Barre
2017-11-06 17:03 ` [PATCH v3 3/9] dt-bindings: interrupt-controllers: add compatible string for stm32h7 Ludovic Barre
2017-11-06 17:03 ` [PATCH v3 4/9] irqchip: stm32: add stm32h7 support Ludovic Barre
2017-11-06 17:03 ` [PATCH v3 5/9] irqchip: stm32: fix initial values Ludovic Barre
2017-11-06 17:03 ` Ludovic Barre [this message]
2017-11-06 17:03 ` [PATCH v3 7/9] ARM: dts: stm32: add exti support for stm32h743 Ludovic Barre
2017-11-06 17:03 ` [PATCH v3 8/9] ARM: dts: stm32: add system config bank node " Ludovic Barre
2017-11-06 17:03 ` [PATCH v3 9/9] ARM: dts: stm32: add support of exti on stm32h743 pinctrl Ludovic Barre
2017-11-07 11:23 ` [PATCH v3 0/9] irqchip: stm32: add stm32h7 support Marc Zyngier
2017-11-07 13:06   ` Ludovic BARRE
2017-11-07 13:11     ` Alexandre Torgue
2018-02-14 15:38 ` Alexandre Torgue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1509987819-29599-7-git-send-email-ludovic.Barre@st.com \
    --to=ludovic.barre@st.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).