[PATCH master] firmware: arm_scmi: pmdomain: restrict default y for driver

Ahmad Fatoum a.fatoum at pengutronix.de
Thu Feb 29 23:47:52 PST 2024


default y is inappropriate for drivers that depend on CONFIG_COMPILE_TEST,
because it enables the driver as soon as CONFIG_COMPILE_TEST is enabled.

While the driver can be built in that case, without
CONFIG_ARM_SCMI_PROTOCOL, it just prints a red error message on init:

  ERROR: initcall scmi_power_domain_driver_register+0x0/0x10 failed: Invalid argument

Therefore, allow building, but don't enable it by default unless
CONFIG_ARM_SCMI_PROTOCOL=y.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 drivers/firmware/arm_scmi/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/arm_scmi/Kconfig b/drivers/firmware/arm_scmi/Kconfig
index e14c1ede3619..29b0152901ad 100644
--- a/drivers/firmware/arm_scmi/Kconfig
+++ b/drivers/firmware/arm_scmi/Kconfig
@@ -73,7 +73,7 @@ endif #ARM_SCMI_PROTOCOL
 config ARM_SCMI_POWER_DOMAIN
 	tristate "SCMI power domain driver"
 	depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF)
-	default y
+	default ARM_SCMI_PROTOCOL
 	select PM_GENERIC_DOMAINS
 	help
 	  This enables support for the SCMI power domains which can be
-- 
2.39.2




More information about the barebox mailing list