summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/db8500_cpufreq_cooling.c
Commit message (Collapse)AuthorAgeFilesLines
* thermal: db8500_cpufreq_cooling: remove usage of IS_ERR_OR_NULL()Eduardo Valentin2013-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | This patch changes the driver to avoid the usage of IS_ERR_OR_NULL() macro. This macro can lead to dangerous results, like returning success (0) during a failure scenario (NULL pointer handling). The case present in this driver can be translated to a simple check for IS_ERR(), as the cpufreq_cooling_register() returns either a valid pointer or an ERR_PTR(). Cc: Zhang Rui <rui.zhang@intel.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Rob Herring <rob.herring@calxeda.com> Cc: Hongbo Zhang <hongbo.zhang@stericsson.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: devicetree-discuss@lists.ozlabs.org Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Fabio Baltieri <fabio.baltieri@linaro.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: db8500: Use of_match_ptr() macro in db8500_cpufreq_cooling.cSachin Kamat2013-01-041-3/+2Star
| | | | | | | | | This eliminates having an #ifdef returning NULL for the case when OF is disabled. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Reviewed-by: Hongbo Zhang <hongbo.zhang@stericsson.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* Thermal: Add ST-Ericsson DB8500 thermal driver.hongbo.zhang2012-11-151-0/+108
This driver is based on the thermal management framework in thermal_sys.c. A thermal zone device is created with the trip points to which cooling devices can be bound, the current cooling device is cpufreq, e.g. CPU frequency is clipped down to cool the CPU, and other cooling devices can be added and bound to the trip points dynamically. The platform specific PRCMU interrupts are used to active thermal update when trip points are reached. Signed-off-by: hongbo.zhang <hongbo.zhang@linaro.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Francesco Lavra <francescolavra.fl@gmail.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>