cpufreq: scpi: Add thermal dependency
authorArnd Bergmann <arnd@arndb.de>
Tue, 13 Mar 2018 11:45:40 +0000 (12:45 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 20 Mar 2018 10:02:42 +0000 (11:02 +0100)
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>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/Kconfig.arm

index fb586e09682d84704a28748673cdc4c571c28105..833b5f41f596b62dc6c59930c45a88ab3e15a422 100644 (file)
@@ -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.