All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cpufreq: imx: fix NVMEM_IMX_OCOTP dependency
@ 2020-12-03 22:53 Arnd Bergmann
  2020-12-07  6:32 ` Viresh Kumar
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2020-12-03 22:53 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Walter Lozano
  Cc: Arnd Bergmann, Ansuel Smith, Peter De Schrijver, linux-pm, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/cpufreq/Kconfig.arm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index 0732854d94ec..434ef03d2762 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -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.
-- 
2.27.0


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

* Re: [PATCH] cpufreq: imx: fix NVMEM_IMX_OCOTP dependency
  2020-12-03 22:53 [PATCH] cpufreq: imx: fix NVMEM_IMX_OCOTP dependency Arnd Bergmann
@ 2020-12-07  6:32 ` Viresh Kumar
  0 siblings, 0 replies; 2+ messages in thread
From: Viresh Kumar @ 2020-12-07  6:32 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Rafael J. Wysocki, Walter Lozano, Arnd Bergmann, Ansuel Smith,
	Peter De Schrijver, linux-pm, linux-kernel

On 03-12-20, 23:53, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/cpufreq/Kconfig.arm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
> index 0732854d94ec..434ef03d2762 100644
> --- a/drivers/cpufreq/Kconfig.arm
> +++ b/drivers/cpufreq/Kconfig.arm
> @@ -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.

-- 
viresh

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

end of thread, other threads:[~2020-12-07  6:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-03 22:53 [PATCH] cpufreq: imx: fix NVMEM_IMX_OCOTP dependency Arnd Bergmann
2020-12-07  6:32 ` Viresh Kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.