diff mbox series

[1/2] cpufreq: scpi: add thermal dependency

Message ID 20180313114607.2061209-1-arnd@arndb.de
State Accepted
Commit 3478b24c5e6fd4f27616674ea94dba8e28fbc7f7
Headers show
Series [1/2] cpufreq: scpi: add thermal dependency | expand

Commit Message

Arnd Bergmann March 13, 2018, 11:45 a.m. UTC
A built-in scpi cpufreq driver cannot link against a modular
thermal framework:

drivers/cpufreq/scpi-cpufreq.o: In function `scpi_cpufreq_ready':
scpi-cpufreq.c:(.text+0x4c): undefined reference to `of_cpufreq_cooling_register'
drivers/cpufreq/scpi-cpufreq.o: In function `scpi_cpufreq_exit':
scpi-cpufreq.c:(.text+0x9c): undefined reference to `cpufreq_cooling_unregister'

This adds a Kconfig dependency that makes sure this configuration
is not possible, while allowing all configurations that can work.
Note that disabling CPU_THERMAL means we don't care about the
THERMAL dependency.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 drivers/cpufreq/Kconfig.arm | 1 +
 1 file changed, 1 insertion(+)

-- 
2.9.0

Comments

Sudeep Holla March 13, 2018, 2:06 p.m. UTC | #1
On 13/03/18 11:45, Arnd Bergmann wrote:
> A built-in scpi cpufreq driver cannot link against a modular

> thermal framework:

> 

> drivers/cpufreq/scpi-cpufreq.o: In function `scpi_cpufreq_ready':

> scpi-cpufreq.c:(.text+0x4c): undefined reference to `of_cpufreq_cooling_register'

> drivers/cpufreq/scpi-cpufreq.o: In function `scpi_cpufreq_exit':

> scpi-cpufreq.c:(.text+0x9c): undefined reference to `cpufreq_cooling_unregister'

> 

> This adds a Kconfig dependency that makes sure this configuration

> is not possible, while allowing all configurations that can work.

> Note that disabling CPU_THERMAL means we don't care about the

> THERMAL dependency.

> 


Makes sense,

Acked-by: Sudeep Holla <sudeep.holla@arm.com>


-- 
Regards,
Sudeep
Rafael J. Wysocki March 22, 2018, 11:27 p.m. UTC | #2
On Wednesday, March 14, 2018 6:09:54 AM CET Viresh Kumar wrote:
> On 13-03-18, 12:45, Arnd Bergmann wrote:

> > A built-in scpi cpufreq driver cannot link against a modular

> > thermal framework:

> > 

> > drivers/cpufreq/scpi-cpufreq.o: In function `scpi_cpufreq_ready':

> > scpi-cpufreq.c:(.text+0x4c): undefined reference to `of_cpufreq_cooling_register'

> > drivers/cpufreq/scpi-cpufreq.o: In function `scpi_cpufreq_exit':

> > scpi-cpufreq.c:(.text+0x9c): undefined reference to `cpufreq_cooling_unregister'

> > 

> > This adds a Kconfig dependency that makes sure this configuration

> > is not possible, while allowing all configurations that can work.

> > Note that disabling CPU_THERMAL means we don't care about the

> > THERMAL dependency.

> > 

> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>

> > ---

> >  drivers/cpufreq/Kconfig.arm | 1 +

> >  1 file changed, 1 insertion(+)

> > 

> > diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm

> > index 9bbb5b39d18a..d9457d1e535c 100644

> > --- a/drivers/cpufreq/Kconfig.arm

> > +++ b/drivers/cpufreq/Kconfig.arm

> > @@ -45,6 +45,7 @@ config ARM_DT_BL_CPUFREQ

> >  config ARM_SCPI_CPUFREQ

> >  	tristate "SCPI based CPUfreq driver"

> >  	depends on ARM_SCPI_PROTOCOL && COMMON_CLK_SCPI

> > +	depends on !CPU_THERMAL || THERMAL

> >  	help

> >  	  This adds the CPUfreq driver support for ARM platforms using SCPI

> >  	  protocol for CPU power management.

> 

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


Applied, thanks!
diff mbox series

Patch

diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index 9bbb5b39d18a..d9457d1e535c 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -45,6 +45,7 @@  config ARM_DT_BL_CPUFREQ
 config ARM_SCPI_CPUFREQ
 	tristate "SCPI based CPUfreq driver"
 	depends on ARM_SCPI_PROTOCOL && COMMON_CLK_SCPI
+	depends on !CPU_THERMAL || THERMAL
 	help
 	  This adds the CPUfreq driver support for ARM platforms using SCPI
 	  protocol for CPU power management.