linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] cpufreq: qoriq: allow building as module with THERMAL=m
@ 2016-02-29 16:04 Arnd Bergmann
  2016-02-29 16:04 ` [PATCH 2/2] cpufreq: mediatek: allow building as a module Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Arnd Bergmann @ 2016-02-29 16:04 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar
  Cc: linux-arm-kernel, Arnd Bergmann, linux-pm, linux-kernel

My previous patch to avoid link errors with the qoriq cpufreq
driver disallowed all of the broken cases, but also prevented
the driver from being built when CONFIG_THERMAL is a module.

This changes the dependency to allow the cpufreq driver to
also be a module in this case, just not built-in.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: cpufreq: qoriq depends on thermal
---

If possible, please fold this change directly into the previous
commit

 drivers/cpufreq/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig
index ca05037dd565..d5e11d24f72b 100644
--- a/drivers/cpufreq/Kconfig
+++ b/drivers/cpufreq/Kconfig
@@ -297,7 +297,7 @@ endif
 config QORIQ_CPUFREQ
 	tristate "CPU frequency scaling driver for Freescale QorIQ SoCs"
 	depends on OF && COMMON_CLK && (PPC_E500MC || ARM)
-	depends on !CPU_THERMAL || THERMAL=y
+	depends on !CPU_THERMAL || THERMAL
 	select CLK_QORIQ
 	help
 	  This adds the CPUFreq driver support for Freescale QorIQ SoCs
-- 
2.7.0


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

* [PATCH 2/2] cpufreq: mediatek: allow building as a module
  2016-02-29 16:04 [PATCH 1/2] cpufreq: qoriq: allow building as module with THERMAL=m Arnd Bergmann
@ 2016-02-29 16:04 ` Arnd Bergmann
  2016-03-01 15:04   ` Matthias Brugger
  2016-02-29 16:26 ` [PATCH 1/2] cpufreq: qoriq: allow building as module with THERMAL=m Viresh Kumar
  2016-03-01  2:00 ` Rafael J. Wysocki
  2 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2016-02-29 16:04 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar
  Cc: linux-arm-kernel, Arnd Bergmann, Matthias Brugger, linux-pm,
	linux-kernel, linux-mediatek

The MT8173 cpufreq driver can currently only be built-in, but
it has a Kconfig dependency on the thermal core. THERMAL
can be a loadable module, which in turn makes this driver
impossible to build.

It is nicer to make the cpufreq driver a module as well, so
this patch turns the option in to a 'tristate' and adapts
the dependency accordingly.

The driver has no module_exit() function, so it will continue
to not support unloading, but it can be built as a module
and loaded at runtime now.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 5269e7067cd6 ("cpufreq: Add ARM_MT8173_CPUFREQ dependency on THERMAL")
---
 drivers/cpufreq/Kconfig.arm      | 4 ++--
 drivers/cpufreq/mt8173-cpufreq.c | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index 0031069b64c9..14b1f9393b05 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -84,10 +84,10 @@ config ARM_KIRKWOOD_CPUFREQ
 	  SoCs.
 
 config ARM_MT8173_CPUFREQ
-	bool "Mediatek MT8173 CPUFreq support"
+	tristate "Mediatek MT8173 CPUFreq support"
 	depends on ARCH_MEDIATEK && REGULATOR
 	depends on ARM64 || (ARM_CPU_TOPOLOGY && COMPILE_TEST)
-	depends on !CPU_THERMAL || THERMAL=y
+	depends on !CPU_THERMAL || THERMAL
 	select PM_OPP
 	help
 	  This adds the CPUFreq driver support for Mediatek MT8173 SoC.
diff --git a/drivers/cpufreq/mt8173-cpufreq.c b/drivers/cpufreq/mt8173-cpufreq.c
index 1efba340456d..2058e6d292ce 100644
--- a/drivers/cpufreq/mt8173-cpufreq.c
+++ b/drivers/cpufreq/mt8173-cpufreq.c
@@ -17,6 +17,7 @@
 #include <linux/cpu_cooling.h>
 #include <linux/cpufreq.h>
 #include <linux/cpumask.h>
+#include <linux/module.h>
 #include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/pm_opp.h>
-- 
2.7.0

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

* Re: [PATCH 1/2] cpufreq: qoriq: allow building as module with THERMAL=m
  2016-02-29 16:04 [PATCH 1/2] cpufreq: qoriq: allow building as module with THERMAL=m Arnd Bergmann
  2016-02-29 16:04 ` [PATCH 2/2] cpufreq: mediatek: allow building as a module Arnd Bergmann
@ 2016-02-29 16:26 ` Viresh Kumar
  2016-03-01  2:00 ` Rafael J. Wysocki
  2 siblings, 0 replies; 5+ messages in thread
From: Viresh Kumar @ 2016-02-29 16:26 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Rafael J. Wysocki, linux-arm-kernel, linux-pm, linux-kernel

On 29-02-16, 17:04, Arnd Bergmann wrote:
> My previous patch to avoid link errors with the qoriq cpufreq
> driver disallowed all of the broken cases, but also prevented
> the driver from being built when CONFIG_THERMAL is a module.
> 
> This changes the dependency to allow the cpufreq driver to
> also be a module in this case, just not built-in.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: cpufreq: qoriq depends on thermal
> ---
> 
> If possible, please fold this change directly into the previous
> commit
> 
>  drivers/cpufreq/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig
> index ca05037dd565..d5e11d24f72b 100644
> --- a/drivers/cpufreq/Kconfig
> +++ b/drivers/cpufreq/Kconfig
> @@ -297,7 +297,7 @@ endif
>  config QORIQ_CPUFREQ
>  	tristate "CPU frequency scaling driver for Freescale QorIQ SoCs"
>  	depends on OF && COMMON_CLK && (PPC_E500MC || ARM)
> -	depends on !CPU_THERMAL || THERMAL=y
> +	depends on !CPU_THERMAL || THERMAL
>  	select CLK_QORIQ
>  	help
>  	  This adds the CPUFreq driver support for Freescale QorIQ SoCs

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

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

* Re: [PATCH 1/2] cpufreq: qoriq: allow building as module with THERMAL=m
  2016-02-29 16:04 [PATCH 1/2] cpufreq: qoriq: allow building as module with THERMAL=m Arnd Bergmann
  2016-02-29 16:04 ` [PATCH 2/2] cpufreq: mediatek: allow building as a module Arnd Bergmann
  2016-02-29 16:26 ` [PATCH 1/2] cpufreq: qoriq: allow building as module with THERMAL=m Viresh Kumar
@ 2016-03-01  2:00 ` Rafael J. Wysocki
  2 siblings, 0 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2016-03-01  2:00 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Viresh Kumar, linux-arm-kernel, linux-pm, linux-kernel

On Monday, February 29, 2016 05:04:20 PM Arnd Bergmann wrote:
> My previous patch to avoid link errors with the qoriq cpufreq
> driver disallowed all of the broken cases, but also prevented
> the driver from being built when CONFIG_THERMAL is a module.
> 
> This changes the dependency to allow the cpufreq driver to
> also be a module in this case, just not built-in.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: cpufreq: qoriq depends on thermal
> ---
> 
> If possible, please fold this change directly into the previous
> commit

Done.

I've applied the [2/2] too.

Thanks,
Rafael


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

* Re: [PATCH 2/2] cpufreq: mediatek: allow building as a module
  2016-02-29 16:04 ` [PATCH 2/2] cpufreq: mediatek: allow building as a module Arnd Bergmann
@ 2016-03-01 15:04   ` Matthias Brugger
  0 siblings, 0 replies; 5+ messages in thread
From: Matthias Brugger @ 2016-03-01 15:04 UTC (permalink / raw)
  To: Arnd Bergmann, Rafael J. Wysocki, Viresh Kumar
  Cc: linux-arm-kernel, linux-pm, linux-kernel, linux-mediatek



On 29/02/16 17:04, Arnd Bergmann wrote:
> The MT8173 cpufreq driver can currently only be built-in, but
> it has a Kconfig dependency on the thermal core. THERMAL
> can be a loadable module, which in turn makes this driver
> impossible to build.
>
> It is nicer to make the cpufreq driver a module as well, so
> this patch turns the option in to a 'tristate' and adapts
> the dependency accordingly.
>
> The driver has no module_exit() function, so it will continue
> to not support unloading, but it can be built as a module
> and loaded at runtime now.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 5269e7067cd6 ("cpufreq: Add ARM_MT8173_CPUFREQ dependency on THERMAL")
> ---

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>

>   drivers/cpufreq/Kconfig.arm      | 4 ++--
>   drivers/cpufreq/mt8173-cpufreq.c | 1 +
>   2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
> index 0031069b64c9..14b1f9393b05 100644
> --- a/drivers/cpufreq/Kconfig.arm
> +++ b/drivers/cpufreq/Kconfig.arm
> @@ -84,10 +84,10 @@ config ARM_KIRKWOOD_CPUFREQ
>   	  SoCs.
>
>   config ARM_MT8173_CPUFREQ
> -	bool "Mediatek MT8173 CPUFreq support"
> +	tristate "Mediatek MT8173 CPUFreq support"
>   	depends on ARCH_MEDIATEK && REGULATOR
>   	depends on ARM64 || (ARM_CPU_TOPOLOGY && COMPILE_TEST)
> -	depends on !CPU_THERMAL || THERMAL=y
> +	depends on !CPU_THERMAL || THERMAL
>   	select PM_OPP
>   	help
>   	  This adds the CPUFreq driver support for Mediatek MT8173 SoC.
> diff --git a/drivers/cpufreq/mt8173-cpufreq.c b/drivers/cpufreq/mt8173-cpufreq.c
> index 1efba340456d..2058e6d292ce 100644
> --- a/drivers/cpufreq/mt8173-cpufreq.c
> +++ b/drivers/cpufreq/mt8173-cpufreq.c
> @@ -17,6 +17,7 @@
>   #include <linux/cpu_cooling.h>
>   #include <linux/cpufreq.h>
>   #include <linux/cpumask.h>
> +#include <linux/module.h>
>   #include <linux/of.h>
>   #include <linux/platform_device.h>
>   #include <linux/pm_opp.h>
>

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

end of thread, other threads:[~2016-03-01 15:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-29 16:04 [PATCH 1/2] cpufreq: qoriq: allow building as module with THERMAL=m Arnd Bergmann
2016-02-29 16:04 ` [PATCH 2/2] cpufreq: mediatek: allow building as a module Arnd Bergmann
2016-03-01 15:04   ` Matthias Brugger
2016-02-29 16:26 ` [PATCH 1/2] cpufreq: qoriq: allow building as module with THERMAL=m Viresh Kumar
2016-03-01  2:00 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).