[tip: irq/drivers] irqchip/mediatek: Add Kconfig option for MediaTek SYSIRQ and CIRQ

From: tip-bot2 for Zyta Szpak

Date: Wed Nov 11 2026 - 15:05:04 EST


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

Commit-ID: 702ae15488ce96d9818deee812d9fc271316fa6e
Gitweb: https://git.kernel.org/tip/702ae15488ce96d9818deee812d9fc271316fa6e
Author: Zyta Szpak <zyta@xxxxxxxxxx>
AuthorDate: Thu, 05 Nov 2026 10:42:34
Committer: Thomas Gleixner <tglx@xxxxxxxxxx>
CommitterDate: Mon, 09 Nov 2026 11:16:45 +01:00

irqchip/mediatek: Add Kconfig option for MediaTek SYSIRQ and CIRQ

Currently, the MediaTek SYSIRQ (irq-mtk-sysirq) and CIRQ (irq-mtk-cirq)
interrupt controller drivers are unconditionally built whenever
CONFIG_ARCH_MEDIATEK is enabled, without a dedicated Kconfig symbol.

Not all MediaTek SoCs require SYSIRQ or CIRQ (for example, newer ARMv8
SoCs and platforms using the MStar interrupt controller), so building
these drivers unconditionally prevents disabling them in tailored kernel
configurations. Tying the build rule directly to CONFIG_ARCH_MEDIATEK in
the Makefile also prevents compile-testing these drivers on non-MediaTek
architectures via CONFIG_COMPILE_TEST.

Introduce the CONFIG_MTK_IRQ Kconfig option to control building
irq-mtk-sysirq.o and irq-mtk-cirq.o. Make it depend on ARCH_MEDIATEK ||
COMPILE_TEST, default to ARCH_MEDIATEK to preserve existing behavior for
all MediaTek configurations, and select IRQ_DOMAIN and
IRQ_DOMAIN_HIERARCHY as required by both drivers.

Signed-off-by: Zyta Szpak <zyta@xxxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
Link: https://patch.msgid.link/20261105104234.2734199-1-zyta@xxxxxxxxxx
---
drivers/irqchip/Kconfig | 14 ++++++++++++++
drivers/irqchip/Makefile | 2 +-
2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index 1620a57..90daedb 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -793,6 +793,20 @@ config MST_IRQ
help
Support MStar Interrupt Controller.

+config MTK_IRQ
+ bool "MediaTek Interrupt Controller"
+ depends on ARCH_MEDIATEK || COMPILE_TEST
+ default ARCH_MEDIATEK
+ select IRQ_DOMAIN
+ select IRQ_DOMAIN_HIERARCHY
+ help
+ Support for the MediaTek System Interrupt Controller (SYSIRQ) and
+ Core Interrupt Controller (CIRQ) found on various MediaTek SoCs.
+ SYSIRQ provides interrupt polarity configuration in front of the
+ GIC, while CIRQ records and flushes external interrupts during
+ system suspend and resume when the primary interrupt controller
+ is powered down.
+
config WPCM450_AIC
bool "Nuvoton WPCM450 Advanced Interrupt Controller"
depends on ARCH_WPCM450
diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
index 16a5fd1..eb539d4 100644
--- a/drivers/irqchip/Makefile
+++ b/drivers/irqchip/Makefile
@@ -72,7 +72,7 @@ obj-$(CONFIG_BCM7120_L2_IRQ) += irq-bcm7120-l2.o
obj-$(CONFIG_BRCMSTB_L2_IRQ) += irq-brcmstb-l2.o
obj-$(CONFIG_KEYSTONE_IRQ) += irq-keystone.o
obj-$(CONFIG_MIPS_GIC) += irq-mips-gic.o
-obj-$(CONFIG_ARCH_MEDIATEK) += irq-mtk-sysirq.o irq-mtk-cirq.o
+obj-$(CONFIG_MTK_IRQ) += irq-mtk-sysirq.o irq-mtk-cirq.o
obj-$(CONFIG_ARCH_DIGICOLOR) += irq-digicolor.o
obj-$(CONFIG_ARCH_SA1100) += irq-sa11x0.o
obj-$(CONFIG_INGENIC_IRQ) += irq-ingenic.o