cpufreq: qcom-hw: Register as a cpufreq cooling device
authorAmit Kucheria <amit.kucheria@linaro.org>
Tue, 29 Jan 2019 04:55:09 +0000 (10:25 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 30 Jan 2019 22:06:08 +0000 (23:06 +0100)
Add the CPUFREQ_IS_COOLING_DEV flag to allow the cpufreq core to
auto-register the driver as a cooling device.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Tested-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/qcom-cpufreq-hw.c

index d83939a1b3d4cd7f4f12a70477eaced3e9bf487f..c88b51304d89913fc2d10c2e27ecbbe1887e68e4 100644 (file)
@@ -231,7 +231,8 @@ static struct freq_attr *qcom_cpufreq_hw_attr[] = {
 
 static struct cpufreq_driver cpufreq_qcom_hw_driver = {
        .flags          = CPUFREQ_STICKY | CPUFREQ_NEED_INITIAL_FREQ_CHECK |
-                         CPUFREQ_HAVE_GOVERNOR_PER_POLICY,
+                         CPUFREQ_HAVE_GOVERNOR_PER_POLICY |
+                         CPUFREQ_IS_COOLING_DEV,
        .verify         = cpufreq_generic_frequency_table_verify,
        .target_index   = qcom_cpufreq_hw_target_index,
        .get            = qcom_cpufreq_hw_get,