summaryrefslogtreecommitdiff
path: root/drivers/thermal
AgeCommit message (Collapse)Author
2013-04-27Merge branch 'cpu_cooling-doc-comments-update' of .git into nextZhang Rui
2013-04-27thermal: db8500_cpufreq_cooling: remove usage of IS_ERR_OR_NULL()Eduardo Valentin
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>
2013-04-27thermal: thermal_core: remove usage of IS_ERR_OR_NULLEduardo Valentin
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 patch has simply be translated to normal check for NULL and if the pointer has an error code. The later case is needed because functions like thermal_zone_get_zone_by_name() could return an ERR_PTR(). Cc: Zhang Rui <rui.zhang@intel.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-27thermal: cpu_cooling: alignment improvementsEduardo Valentin
Improve code readiness by changing alignments so that they match open parenthesis, like checkpatch.pl --strict suggests. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-27thermal: cpu_cooling: remove checkpatch.pl warningEduardo Valentin
Simple code style fix. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-27thermal: cpu_cooling: remove trailing blank lineEduardo Valentin
Remove unnecessary blank line. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-27thermal: cpu_cooling: align on open parenthesisEduardo Valentin
Improve code readiness by remove checkpatch.pl warnings on get_property function. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-27thermal: cpu_cooling: standardize comment styleEduardo Valentin
There are at least three patterns for oneline comments in this file. This patch changes them to one single pattern Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-27thermal: cpu_cooling: standardize end of functionEduardo Valentin
Just for code readiness, this patch makes all functions on this file to have a blank line before their returns. Now, some functions follow this pattern, and others will not have a blank line. So, this patch makes it a single pattern. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-27thermal: cpu_cooling: remove trailing white spacesEduardo Valentin
Remove unnecessary white spaces. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25Merge branch 'cpu_cooling-doc-comments-update' of .git into nextZhang Rui
2013-04-25Merge branch 'thermal_core-doc-comments-update' of .git into nextZhang Rui
2013-04-25thermal: update kernel-doc for thermal_zone_device_registerEduardo Valentin
This patch updates the documentation for thermal_zone_device_register and removes the warnings generated by scripts/kernel-doc -v. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: update kernel-doc for create_trip_attrsEduardo Valentin
This patch updates the documentation for create_trip_attrs and removes the warnings generated by scripts/kernel-doc -v. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: update kernel-doc for thermal_cooling_device_registerEduardo Valentin
This patch updates the documentation for thermal_cooling_device_register and removes the warnings generated by scripts/kernel-doc -v. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: update kernel-doc for thermal_zone_unbind_cooling_deviceEduardo Valentin
This patch updates the documentation for thermal_zone_unbind_cooling_device and removes the warnings generated by scripts/kernel-doc -v. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: update kernel-doc for thermal_zone_bind_cooling_deviceEduardo Valentin
This patch updates the documentation for thermal_zone_bind_cooling_device and removes the warnings generated by scripts/kernel-doc -v. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: use EXPORT_SYMBOL_GPLEduardo Valentin
Restrict usage of GPL modules. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: rename notify_thermal_framework to thermal_notify_frameworkEduardo Valentin
To follow the prefix names used by the thermal functions, this patch renames notify_thermal_framework to thermal_notify_framework. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: update driver licenseEduardo Valentin
As per the comment at the top of this file, this is a GPLv2 driver. This patch updates the driver license accordingly. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: use strlcpy instead of strcpyEduardo Valentin
For memory boundaries safety, use strlcpy instead of strcpy. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: cpu_cooling: remove unused symbolsEduardo Valentin
The list is not needed so far. Thus removing it. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: cpu_cooling: remove not needed curl bracketsEduardo Valentin
Just for style purposes, remove extra curl brackets. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: cpu_cooling: use snprintf instead of sprintfEduardo Valentin
Limit the amount of bytes written to dev_name by secure writing with snprintf. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: cpu_cooling: update kernel-doc comment for cpufreq_cooling_unregisterEduardo Valentin
Update comments for this exported function. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: cpu_cooling: update kernel-doc for cpufreq_cooling_registerEduardo Valentin
Add proper documentation for exported function cpufreq_cooling_register. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: cpu_cooling: update documentation for cpufreq_set_cur_stateEduardo Valentin
Update documentation for cpufreq_set_cur_state callback. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: cpu_cooling: update documentation for cpufreq_get_cur_stateEduardo Valentin
Update documentation for cpufreq_get_cur_state callback. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: cpu_cooling: update documentation for cpufreq_get_max_stateEduardo Valentin
Update documentation for cpufreq_get_max_state callback. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: cpu_cooling: update Kconfig entryEduardo Valentin
There is no support for hotplug or any other means of reducing temperature. So, this patch removes these references from Kconfig. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: cpu_cooling: update documentation for cpufreq_thermal_notifierEduardo Valentin
Update kernel-doc comment and documentation for cpufreq_thermal_notifier. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: cpu_cooling: update documentation for cpufreq_apply_coolingEduardo Valentin
Update kernel-doc comments for cpufreq_apply_cooling function. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: cpu_cooling: improve documentation for get_cpu_frequencyEduardo Valentin
Fix kernel-doc warning on get_cpu_frequency and improve documentation comments. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: cpu_cooling: document cpufreq_get_cooling_levelEduardo Valentin
Add documentation for cpufreq_get_cooling_level. As this is an exported function, it has to be documented. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: cpu_cooling: add documentation for get_propertyEduardo Valentin
As this is one of the central functions of this file, it deserves a proper documentation. This patch improves the existing comment to format it as a kernel-doc style. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: cpu_cooling: fix kernel doc for is_cpufreq_validEduardo Valentin
Update documentation for is_cpufreq_valid function so that kernel-doc does not complain about return value. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: cpu_cooling: remove compiler warningEduardo Valentin
level will be used only if GET_FREQ mode is requested. There is no potential harm with current code. But for cleaning the compilation log, this patch initializes level to zero. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: cpu_cooling: use EXPORT_SYMBOL_GPLEduardo Valentin
Restrict the usage to GPL modules. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: cpu_cooling: fix kernel_doc for cpufreq_cooling_deviceEduardo Valentin
Simple fixes for making kernel_doc happy about struct cpufreq_cooling_device. Includes also a minor spelling fix. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25thermal: cpu_cooling: remove unused headersEduardo Valentin
Remove some unused header files. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-25Merge branch 'exynos-fix' of .git into nextZhang Rui
2013-04-24Thermal: exynos: Add compatible string for exynos4412Sachin Kamat
Added compatible string for Exynos4412 SoC. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Amit Daniel Kachhap <amit.daniel@samsung.com> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-24Thermal: exynos: Add clk_{un}prepare APIsSachin Kamat
clk_{un}prepare APIs are required to migrate to common clock framework. While at it convert to use devm_clk_get as it removes some cleanup code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Amit Daniel Kachhap <amit.daniel@samsung.com> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-24Merge branch 'eduardo-1' of .git into nextZhang Rui
2013-04-17Thermal: cpufreq cooling: endian bug in cpufreq_get_max_state()Dan Carpenter
This code doesn't work on big endian systems because we're storing low values in the high bits of the unsigned long. It makes it a very high value instead. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-15thermal: expose thermal_zone_get_temp APIEduardo Valentin
This patch exports the thermal_zone_get_temp API so that driver writers can fetch temperature of thermal zones managed by other drivers. Acked-by: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-15thermal: introduce thermal_zone_get_zone_by_name helper functionEduardo Valentin
This patch adds a helper function to get a reference of a thermal zone, based on the zone type name. It will perform a zone name lookup and return a reference to a thermal zone device that matches the name requested. In case the zone is not found or when several zones match same name or if the required parameters are invalid, it will return the corresponding error code (ERR_PTR). Cc: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-15Merge branch 'thermal' of ↵Zhang Rui
git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux into next Conflicts: drivers/thermal/cpu_cooling.c
2013-04-14Thermal: build cpu_cooling code into thermal_sys moduleZhang Rui
Signed-off-by: Zhang Rui <rui.zhang@intel.com> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Durgadoss R <durgadoss.r@intel.com>
2013-04-14Thermal: build thermal governors into thermal_sys moduleZhang Rui
The thermal governors are part of the thermal framework, rather than a seperate feature/module. Because the generic thermal layer can not work without thermal governors, and it must load the thermal governors during its initialization. Build them into one module in this patch. This also fix a problem that the generic thermal layer does not work when CONFIG_THERMAL=m and CONFIG_THERMAL_GOV_XXX=y. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Durgadoss R <durgadoss.r@intel.com>