[PATCH] irqchip: LAN966X_OIC should depend on SOC_LAN966 || MFD_LAN966X_PCI

From: Geert Uytterhoeven
Date: Tue Jul 23 2024 - 03:18:32 EST


The Microchip LAN966x outband interrupt controller is only present on
Microchip LAN966x SoCs. However, when used as a PCI endpoint, all
peripherals of the LAN966x SoC can be accessed by the PCI host. Hence
add dependencies on SOC_LAN966 and MFD_LAN966X_PCI, to prevent asking
the user about this driver when configuring a kernel without Microchip
LAN966x SoC and PCIe support.

Fixes: 3e3a7b35332924c8 ("irqchip: Add support for LAN966x OIC")
Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
---
The patch defining MFD_LAN966X_PCI has not been accepted yet.
Hence my initial thought was to add a dependency on PCI instead, but
that wouldn't make much sense, as the OIC driver cannot be used without
the MFD driver anyway. Alternatively, the MFD_LAN966X_PCI dependency
could be dropped for now, requiring a follow-up patch later.

"[PATCH v2 18/19] mfd: Add support for LAN966x PCI device"
https://lore.kernel.org/all/20240527161450.326615-19-herve.codina@xxxxxxxxxxx/
---
drivers/irqchip/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index bac1f0cb26e67a2b..b8d5ca3183824c93 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -171,6 +171,7 @@ config IXP4XX_IRQ

config LAN966X_OIC
tristate "Microchip LAN966x OIC Support"
+ depends on SOC_LAN966 || MFD_LAN966X_PCI || COMPILE_TEST
select GENERIC_IRQ_CHIP
select IRQ_DOMAIN
help
--
2.34.1