mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH master] firmware: arm_scmi: pmdomain: restrict default y for driver
@ 2024-03-01  7:47 Ahmad Fatoum
  2024-03-01  9:19 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2024-03-01  7:47 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

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@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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH master] firmware: arm_scmi: pmdomain: restrict default y for driver
  2024-03-01  7:47 [PATCH master] firmware: arm_scmi: pmdomain: restrict default y for driver Ahmad Fatoum
@ 2024-03-01  9:19 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2024-03-01  9:19 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum


On Fri, 01 Mar 2024 08:47:52 +0100, Ahmad Fatoum wrote:
> 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
> 
> [...]

Applied, thanks!

[1/1] firmware: arm_scmi: pmdomain: restrict default y for driver
      https://git.pengutronix.de/cgit/barebox/commit/?id=a6e780cbe3a5 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-01  9:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-01  7:47 [PATCH master] firmware: arm_scmi: pmdomain: restrict default y for driver Ahmad Fatoum
2024-03-01  9:19 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox