Skip to contentSkip to conversation

cpufreq: imx: fix NVMEM_IMX_OCOTP dependency

PATCH Applied Arnd Bergmann 2 participants 2 messages Dec 3, 2020 – Dec 7, 2020 CPU frequency scaling framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpufreq: imx: fix NVMEM_IMX_OCOTP dependency

From: Arnd Bergmann <[email protected]>

A driver should not 'select' drivers from another subsystem. If NVMEM is disabled, this one results in a warning:

WARNING: unmet direct dependencies detected for NVMEM_IMX_OCOTP
Depends on [n]: NVMEM [=n] && (ARCH_MXC [=y] || COMPILE_TEST [=y]) && HAS_IOMEM [=y] Selected by [y]:
- ARM_IMX6Q_CPUFREQ [=y] && CPU_FREQ [=y] && (ARM || ARM64 [=y]) && ARCH_MXC [=y] && REGULATOR_ANATOP [=y]

Change the 'select' to 'depends on' to prevent it from going wrong, and allow compile-testing without that driver, since it is only a runtime dependency.

Fixes 2782ef34ed23 ("cpufreq: imx: Select NVMEM_IMX_OCOTP")
---
 drivers/cpufreq/Kconfig.arm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/Kconfig.arm +1 -1
index 0732854d94ec..434ef03d2762 100644
@@ -94,7 +94,7 @@ config ARM_IMX6Q_CPUFREQ
 	tristate "Freescale i.MX6 cpufreq support"
 	depends on ARCH_MXC
 	depends on REGULATOR_ANATOP
-	select NVMEM_IMX_OCOTP
+	depends on NVMEM_IMX_OCOTP || COMPILE_TEST
 	select PM_OPP
 	help
 	  This adds cpufreq driver support for Freescale i.MX6 series SoCs.
Signature · 1 line
2.27.0
maintainer Applied
#1 lore raw
Quoted 25 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

A driver should not 'select' drivers from another subsystem. If NVMEM is disabled, this one results in a warning:

WARNING: unmet direct dependencies detected for NVMEM_IMX_OCOTP
Depends on [n]: NVMEM [=n] && (ARCH_MXC [=y] || COMPILE_TEST [=y]) && HAS_IOMEM [=y] Selected by [y]:
- ARM_IMX6Q_CPUFREQ [=y] && CPU_FREQ [=y] && (ARM || ARM64 [=y]) && ARCH_MXC [=y] && REGULATOR_ANATOP [=y]

Change the 'select' to 'depends on' to prevent it from going wrong, and allow compile-testing without that driver, since it is only a runtime dependency.

Fixes 2782ef34ed23 ("cpufreq: imx: Select NVMEM_IMX_OCOTP")
---
 drivers/cpufreq/Kconfig.arm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/Kconfig.arm +0 -0
index 0732854d94ec..434ef03d2762 100644

drivers/cpufreq/Kconfig.arm config ARM_IMX6Q_CPUFREQ · line 100

Quoted 8 lines
drivers/cpufreq/Kconfig.arm +1 -1
@@ -94,7 +94,7 @@ config ARM_IMX6Q_CPUFREQ
 	tristate "Freescale i.MX6 cpufreq support"
 	depends on ARCH_MXC
 	depends on REGULATOR_ANATOP
-	select NVMEM_IMX_OCOTP
+	depends on NVMEM_IMX_OCOTP || COMPILE_TEST
 	select PM_OPP
 	help
 	  This adds cpufreq driver support for Freescale i.MX6 series SoCs.

Applied. Thanks.

Signature · 1 line
viresh