Skip to contentSkip to conversation

rtc: mt6397: select IRQ_DOMAIN instead of depending on it

PATCH Applied Randy Dunlap 2 participants 2 messages Feb 13, 2024 – Feb 29, 2024

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

PATCH v2 1/1 rtc: mt6397: select IRQ_DOMAIN instead of depending on it

IRQ_DOMAIN is a hidden (not user visible) symbol. Users cannot set it directly thru "make *config", so drivers should select it instead of depending on it if they need it.
Relying on it being set for a dependency is risky.

Consistently using "select" or "depends on" can also help reduce Kconfig circular dependency issues.

Therefore, change the use of "depends on" for IRQ_DOMAIN to "select" for RTC_DRV_MT6397.

Fixes 04d3ba70a3c9 ("rtc: mt6397: add IRQ domain dependency")
Cc Arnd Bergmann <[email protected]>
Cc Eddie Huang <[email protected]>
Cc Sean Wang <[email protected]>
Cc Matthias Brugger <[email protected]>
Cc Alessandro Zummo <[email protected]>
Cc Alexandre Belloni <[email protected]>
Cc Marc Zyngier <[email protected]>
Cc Philipp Zabel <[email protected]>
Cc Peter Rosin <[email protected]>

---
v2: add Rev-by: from AngeloGioacchino

 drivers/rtc/Kconfig |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/rtc/Kconfig +2 -1
diff -- a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
@@ -1858,7 +1858,8 @@ config RTC_DRV_MT2712
 
 config RTC_DRV_MT6397
 	tristate "MediaTek PMIC based RTC"
-	depends on MFD_MT6397 || (COMPILE_TEST && IRQ_DOMAIN)
+	depends on MFD_MT6397 || COMPILE_TEST
+	select IRQ_DOMAIN
 	help
 	  This selects the MediaTek(R) RTC driver. RTC is part of MediaTek
 	  MT6397 PMIC. You should enable MT6397 PMIC MFD before select
maintainer Applied
#1 lore raw
Quoted 9 lines · Randy Dunlap

IRQ_DOMAIN is a hidden (not user visible) symbol. Users cannot set it directly thru "make *config", so drivers should select it instead of depending on it if they need it.
Relying on it being set for a dependency is risky.

Consistently using "select" or "depends on" can also help reduce Kconfig circular dependency issues.

[...]

Applied, thanks!

[1/1] rtc: mt6397: select IRQ_DOMAIN instead of depending on it

      https://git.kernel.org/abelloni/c/544c42f798e1

Best regards,

Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com