summaryrefslogtreecommitdiff
path: root/drivers/thermal/imx_thermal.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-29 13:13:41 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-29 13:13:41 -0800
commit4c5d4995030c298db9fe0db00693a4641243cd9e (patch)
tree1d5fa84e5ee81cda90c32aa3a1be33506d09e45b /drivers/thermal/imx_thermal.c
parent45f87de57f8fad59302fd263dd81ffa4843b5b24 (diff)
parent7429b1e0d00e62426c74a45195ba72149cb9ad64 (diff)
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
Pull thermal management updates from Zhang Rui: "First of all, the most important change is the thermal cpu cooling fixes. The major fix here is to have proper sequencing between cpufreq layer and thermal cpu cooling registration. A take away of this fix is an improvement in the thermal drivers code. Thermal drivers that require cpu cooling do not need to check for cpufreq layer. The requirement now is to propagate the error code, if any, while registering cpu cooling device. Thanks to Viresh for implementing the required CPUfreq changes. Second, a new driver is introduced for int340x processor thermal device. Given that int340x thermal is disabled by default, and this processor thermal device is only available on limited platforms, plus the driver does nothing but exposes some thermal limitation information for user space to use, thus I think it is safe to include it in this pull request after missing 3.19-rc2. Specifics: - Thermal cpu cooling fixes and cleanups. - introduce INT340X processor thermal reporting device driver. - several small fixes and cleanups for int340x thermal drivers" * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (43 commits) Thermal/int340x/int3403: Free acpi notification handler Thermal/int340x/processor_thermal: Fix memory leak Thermal/int340x/int3403: Fix memory leak thermal: int340x: Introduce processor reporting device thermal: int340x_thermal: drop owner assignment from platform_drivers thermal: drop owner assignment from platform_drivers thermal: cpu_cooling: document node in struct cpufreq_cooling_device thermal/powerclamp: add ids for future xeon cpus Thermal/int340x: Handle properly the case when _trt or _art acpi entry is missing thermal: cpu_cooling: return ERR_PTR() for !CPU_THERMAL or !THERMAL_OF thermal: cpu_cooling: small memory leak on error thermal: ti-soc-thermal: Do not print error message in the EPROBE_DEFER case thermal: db8500: Do not print error message in the EPROBE_DEFER case thermal: imx: Do not print error message in the EPROBE_DEFER case thermal: Fix cdev registration with THERMAL_NO_LIMIT on 64bit drivers: thermal: Remove ARCH_HAS_BANDGAP dependency for samsung thermal:core:fix: Check return code of the ->get_max_state() callback thermal: cpu_cooling: update copyright tags thermal: cpu_cooling: Use cpufreq_dev->freq_table for finding level/freq thermal: cpu_cooling: Store frequencies in descending order ...
Diffstat (limited to 'drivers/thermal/imx_thermal.c')
-rw-r--r--drivers/thermal/imx_thermal.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
index 88b32f942dcf..c1188ac053c9 100644
--- a/drivers/thermal/imx_thermal.c
+++ b/drivers/thermal/imx_thermal.c
@@ -9,7 +9,6 @@
#include <linux/clk.h>
#include <linux/cpu_cooling.h>
-#include <linux/cpufreq.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/init.h>
@@ -454,15 +453,10 @@ static int imx_thermal_probe(struct platform_device *pdev)
const struct of_device_id *of_id =
of_match_device(of_imx_thermal_match, &pdev->dev);
struct imx_thermal_data *data;
- struct cpumask clip_cpus;
struct regmap *map;
int measure_freq;
int ret;
- if (!cpufreq_get_current_driver()) {
- dev_dbg(&pdev->dev, "no cpufreq driver!");
- return -EPROBE_DEFER;
- }
data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
if (!data)
return -ENOMEM;
@@ -516,12 +510,13 @@ static int imx_thermal_probe(struct platform_device *pdev)
regmap_write(map, MISC0 + REG_SET, MISC0_REFTOP_SELBIASOFF);
regmap_write(map, TEMPSENSE0 + REG_SET, TEMPSENSE0_POWER_DOWN);
- cpumask_set_cpu(0, &clip_cpus);
- data->cdev = cpufreq_cooling_register(&clip_cpus);
+ data->cdev = cpufreq_cooling_register(cpu_present_mask);
if (IS_ERR(data->cdev)) {
ret = PTR_ERR(data->cdev);
- dev_err(&pdev->dev,
- "failed to register cpufreq cooling device: %d\n", ret);
+ if (ret != -EPROBE_DEFER)
+ dev_err(&pdev->dev,
+ "failed to register cpufreq cooling device: %d\n",
+ ret);
return ret;
}