summaryrefslogtreecommitdiff
path: root/drivers/thermal/thermal_core.c
AgeCommit message (Collapse)Author
2013-06-13Merge branches 'for-rc' and 'ti-soc' of .git into nextZhang Rui
2013-06-13thermal: consider emul_temperature while computing trendEduardo Valentin
In case emulated temperature is in use, using the trend provided by driver layer can lead to bogus situation. In this case, debugger user would set a temperature value, but the trend would be from driver computation. To avoid this situation, this patch changes the get_tz_trend() to consider the emulated temperature whenever that is in use. Cc: Zhang Rui <rui.zhang@intel.com> Cc: Amit Daniel Kachhap <amit.daniel@samsung.com> Cc: Durgadoss R <durgadoss.r@intel.com> 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-05-28Thermal: core: Ask .get_trip_temp() to register thermal zone device.Jonghwa Lee
This patch adds a requirement needing .get_trip_temp() callback function for registering thermal zone device. This function is used when thermal zone is updated and essential where thermal core handles thermal trip based only polling way not hw interrupt. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Acked-by: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-05-28thermal: cut the spaces when user sets policyAndy Shevchenko
Setting policy results in invalid value error. % echo "step_wise" > policy % echo: write error: Invalid argument Need clean up of the buffer which "echo" may add based on the arguments, before comparing aganist list of governor names. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reported-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Tested-by: Eduardo Valentin <eduardo.valentin@ti.com> 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-24thermal: 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-24thermal: 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-24thermal: 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-24thermal: 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-24thermal: 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-24thermal: 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-24thermal: 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-24thermal: 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-24thermal: 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-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-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>
2013-04-13Thermal: rename thermal_sys.c to thermal_core.cZhang Rui
this is the preparation work to build all the thermal core framework source file, like governors, cpu cooling, etc, into one module. No functional change in this patch. 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>