Skip to contentSkip to conversation

irqchip/sunxi-nmi: add missing flag

PATCH Applied Philippe Simons 3 participants 3 messages Jan 12, 2025 – Jan 18, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 irqchip/sunxi-nmi: add missing flag

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.

---
 drivers/irqchip/irq-sunxi-nmi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/irqchip/irq-sunxi-nmi.c +3 -1
index bb92fd85e..8dda0a85e 100644
@@ -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;
Signature · 1 line
2.47.1
#1 lore raw

[tip: irq/urgent] irqchip/sunxi-nmi: Add missing SKIP_WAKE flag

The following commit has been merged into the irq/urgent branch of tip:

The following commit has been merged into the irq/urgent branch of tip:

Commit-ID:     3a748d483d80f066ca4b26abe45cdc0c367d13e9
Gitweb:        https://git.kernel.org/tip/3a748d483d80f066ca4b26abe45cdc0c367d13e9
Author:        Philippe Simons <[email protected]>
AuthorDate:    Sun, 12 Jan 2025 13:34:02 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Wed, 15 Jan 2025 09:42:45 +01:00

irqchip/sunxi-nmi: Add missing SKIP_WAKE flag

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 SKIP_WAKE flag to prevent the sunxi NMI controller from going to sleep, so that the power key can wake up those systems.

[ tglx: Fixed up coding style ]

---
 drivers/irqchip/irq-sunxi-nmi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/irqchip/irq-sunxi-nmi.c +2 -1
index bb92fd8..0b43121 100644
@@ -186,7 +186,8 @@ 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;
maintainer Reviewed-by on v2 1/1
#2 lore raw
In reply to Philippe Simons

Dne nedelja, 12. januar 2025 ob 13:34:02 Srednjeevropski standardni čas je Philippe Simons napisal(a):

Quoted 11 lines

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.

---

Please provide changelog here.

Quoted 8 lines
 drivers/irqchip/irq-sunxi-nmi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/irqchip/irq-sunxi-nmi.c +0 -0
index bb92fd85e..8dda0a85e 100644

drivers/irqchip/irq-sunxi-nmi.c static int __init sunxi_sc_nmi_irq_init(struct device_node *node, · line 191

Quoted 7 lines
drivers/irqchip/irq-sunxi-nmi.c +3 -1
@@ -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:

Best regards,
Jernej

Quoted 4 lines
drivers/irqchip/irq-sunxi-nmi.c +0 -0
 	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;