* [PATCH v2] irqchip/sunxi-nmi: add missing flag
@ 2025-01-12 12:34 Philippe Simons
2025-01-18 10:22 ` Jernej Škrabec
0 siblings, 1 reply; 2+ messages in thread
From: Philippe Simons @ 2025-01-12 12:34 UTC (permalink / raw)
To: Thomas Gleixner, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
open list:IRQCHIP DRIVERS,
moderated list:ARM/Allwinner sunXi SoC support,
open list:ARM/Allwinner sunXi SoC support
Cc: Philippe Simons
Some boards with Allwinner SoCs connect the PMIC's IRQ pin to the SoC's
NMI pin instead of a normal GPIO. Since the power key is connected
to the PMIC, and people expect to wake up a suspended system via
this key, the NMI IRQ controller must stay alive when the
system goes into suspend.
Add the flag to prevent the sunxi NMI controller from going to sleep,
so that the power key can wake up those systems.
Signed-off-by: Philippe Simons <simons.philippe@gmail.com>
---
drivers/irqchip/irq-sunxi-nmi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-sunxi-nmi.c b/drivers/irqchip/irq-sunxi-nmi.c
index bb92fd85e..8dda0a85e 100644
--- a/drivers/irqchip/irq-sunxi-nmi.c
+++ b/drivers/irqchip/irq-sunxi-nmi.c
@@ -186,7 +186,9 @@ static int __init sunxi_sc_nmi_irq_init(struct device_node *node,
gc->chip_types[0].chip.irq_unmask = irq_gc_mask_set_bit;
gc->chip_types[0].chip.irq_eoi = irq_gc_ack_set_bit;
gc->chip_types[0].chip.irq_set_type = sunxi_sc_nmi_set_type;
- gc->chip_types[0].chip.flags = IRQCHIP_EOI_THREADED | IRQCHIP_EOI_IF_HANDLED;
+ gc->chip_types[0].chip.flags = IRQCHIP_EOI_THREADED |
+ IRQCHIP_EOI_IF_HANDLED |
+ IRQCHIP_SKIP_SET_WAKE;
gc->chip_types[0].regs.ack = reg_offs->pend;
gc->chip_types[0].regs.mask = reg_offs->enable;
gc->chip_types[0].regs.type = reg_offs->ctrl;
--
2.47.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] irqchip/sunxi-nmi: add missing flag
2025-01-12 12:34 [PATCH v2] irqchip/sunxi-nmi: add missing flag Philippe Simons
@ 2025-01-18 10:22 ` Jernej Škrabec
0 siblings, 0 replies; 2+ messages in thread
From: Jernej Škrabec @ 2025-01-18 10:22 UTC (permalink / raw)
To: Thomas Gleixner, Chen-Yu Tsai, Samuel Holland,
open list:IRQCHIP DRIVERS,
moderated list:ARM/Allwinner sunXi SoC support,
open list:ARM/Allwinner sunXi SoC support, Philippe Simons
Cc: Philippe Simons
Dne nedelja, 12. januar 2025 ob 13:34:02 Srednjeevropski standardni čas je Philippe Simons napisal(a):
> Some boards with Allwinner SoCs connect the PMIC's IRQ pin to the SoC's
> NMI pin instead of a normal GPIO. Since the power key is connected
> to the PMIC, and people expect to wake up a suspended system via
> this key, the NMI IRQ controller must stay alive when the
> system goes into suspend.
>
> Add the flag to prevent the sunxi NMI controller from going to sleep,
> so that the power key can wake up those systems.
>
> Signed-off-by: Philippe Simons <simons.philippe@gmail.com>
> ---
Please provide changelog here.
> drivers/irqchip/irq-sunxi-nmi.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/irqchip/irq-sunxi-nmi.c b/drivers/irqchip/irq-sunxi-nmi.c
> index bb92fd85e..8dda0a85e 100644
> --- a/drivers/irqchip/irq-sunxi-nmi.c
> +++ b/drivers/irqchip/irq-sunxi-nmi.c
> @@ -186,7 +186,9 @@ static int __init sunxi_sc_nmi_irq_init(struct device_node *node,
> gc->chip_types[0].chip.irq_unmask = irq_gc_mask_set_bit;
> gc->chip_types[0].chip.irq_eoi = irq_gc_ack_set_bit;
> gc->chip_types[0].chip.irq_set_type = sunxi_sc_nmi_set_type;
> - gc->chip_types[0].chip.flags = IRQCHIP_EOI_THREADED | IRQCHIP_EOI_IF_HANDLED;
> + gc->chip_types[0].chip.flags = IRQCHIP_EOI_THREADED |
> + IRQCHIP_EOI_IF_HANDLED |
> + IRQCHIP_SKIP_SET_WAKE;
Alignment seems off. With that fixed:
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com
Best regards,
Jernej
> gc->chip_types[0].regs.ack = reg_offs->pend;
> gc->chip_types[0].regs.mask = reg_offs->enable;
> gc->chip_types[0].regs.type = reg_offs->ctrl;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-18 10:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-12 12:34 [PATCH v2] irqchip/sunxi-nmi: add missing flag Philippe Simons
2025-01-18 10:22 ` Jernej Škrabec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox