Skip to content

Commit 90af7c2

Browse files
ludovicbarreMarc Zyngier
authored andcommitted
irqchip/stm32: Move the wakeup on interrupt mask
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 <[email protected]> Signed-off-by: Marc Zyngier <[email protected]>
1 parent 2ca6b9b commit 90af7c2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/irqchip/irq-stm32-exti.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,16 +156,16 @@ static int stm32_irq_set_wake(struct irq_data *data, unsigned int on)
156156
struct irq_chip_generic *gc = irq_data_get_irq_chip_data(data);
157157
const struct stm32_exti_bank *stm32_bank = gc->private;
158158
int pin = data->hwirq % IRQS_PER_BANK;
159-
u32 emr;
159+
u32 imr;
160160

161161
irq_gc_lock(gc);
162162

163-
emr = irq_reg_readl(gc, stm32_bank->emr_ofst);
163+
imr = irq_reg_readl(gc, stm32_bank->imr_ofst);
164164
if (on)
165-
emr |= BIT(pin);
165+
imr |= BIT(pin);
166166
else
167-
emr &= ~BIT(pin);
168-
irq_reg_writel(gc, emr, stm32_bank->emr_ofst);
167+
imr &= ~BIT(pin);
168+
irq_reg_writel(gc, imr, stm32_bank->imr_ofst);
169169

170170
irq_gc_unlock(gc);
171171

0 commit comments

Comments
 (0)