linux/drivers/thermal
Krzysztof Kozlowski f7e8bc5779 thermal: hwmon: Properly report critical temperature in sysfs
commit f37fabb864 upstream.

In the critical sysfs entry the thermal hwmon was returning wrong
temperature to the user-space.  It was reporting the temperature of the
first trip point instead of the temperature of critical trip point.

For example:
	/sys/class/hwmon/hwmon0/temp1_crit:50000
	/sys/class/thermal/thermal_zone0/trip_point_0_temp:50000
	/sys/class/thermal/thermal_zone0/trip_point_0_type:active
	/sys/class/thermal/thermal_zone0/trip_point_3_temp:120000
	/sys/class/thermal/thermal_zone0/trip_point_3_type:critical

Since commit e68b16abd9 ("thermal: add hwmon sysfs I/F") the driver
have been registering a sysfs entry if get_crit_temp() callback was
provided.  However when accessed, it was calling get_trip_temp() instead
of the get_crit_temp().

Fixes: e68b16abd9 ("thermal: add hwmon sysfs I/F")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2017-03-16 02:26:26 +00:00
..
samsung thermal: exynos: Fix unbalanced regulator disable on probe failure 2015-12-13 17:49:07 +00:00
ti-soc-thermal thermal: ti-soc-thermal: ti-bandgap.c: Cleaning up wrong address is checked 2014-07-01 09:52:35 +08:00
armada_thermal.c thermal: armada: Update Armada 380 thermal sensor coefficients 2015-06-02 12:08:12 +01:00
cpu_cooling.c thermal: cpu_cooling: Use cpufreq_for_each_valid_entry macro for iteration 2014-04-30 00:06:49 +02:00
db8500_cpufreq_cooling.c thermal: db8500_cpufreq_cooling: remove usage of IS_ERR_OR_NULL() 2013-04-27 09:28:38 +08:00
db8500_thermal.c thermal: db8500: Fix missing mutex_unlock() in probe error paths 2013-03-26 22:08:08 +08:00
dove_thermal.c Merge branches 'misc', 'drv_cleanup', 'devm-cleanup' and 'ti-soc' of .git into next 2013-05-28 10:46:46 +08:00
fair_share.c Thermal: build thermal governors into thermal_sys module 2013-04-14 23:28:43 +08:00
imx_thermal.c Thermal: imx: correct critical trip temperature setting 2014-07-01 09:22:28 +08:00
int3403_thermal.c Thermal/int3403: Fix thermal hysteresis unit conversion 2014-05-15 16:38:48 +08:00
intel_powerclamp.c tick/powerclamp: Remove tick_nohz_idle abuse 2015-01-15 10:44:41 +00:00
intel_soc_dts_thermal.c thermal: Intel SoC DTS thermal 2014-05-15 16:37:24 +08:00
Kconfig Merge branches 'armada-375-380-soc-support', 'eduardo-thermal-soc-fixes', 'intel-soc-dts-thermal' and 'thermal-soc-fixes' of .git into next 2014-05-15 17:18:02 +08:00
kirkwood_thermal.c Merge branches 'misc', 'drv_cleanup', 'devm-cleanup' and 'ti-soc' of .git into next 2013-05-28 10:46:46 +08:00
Makefile thermal: Intel SoC DTS thermal 2014-05-15 16:37:24 +08:00
of-thermal.c thermal: Bind cooling devices with the correct arguments 2014-06-30 10:20:27 +08:00
rcar_thermal.c thermal: rcar: remove unnecessary OOM messages 2014-05-15 17:15:26 +08:00
spear_thermal.c thermal: spear: remove unnecessary OOM messages 2014-05-15 17:15:26 +08:00
step_wise.c thermal: step_wise: fix: Prevent from binary overflow when trend is dropping 2015-08-10 09:54:04 +01:00
thermal_core.c thermal: Fix error path in thermal_init() 2015-01-15 10:43:37 +00:00
thermal_core.h thermal: introduce device tree parser 2013-12-04 09:31:34 -04:00
thermal_hwmon.c thermal: hwmon: Properly report critical temperature in sysfs 2017-03-16 02:26:26 +00:00
thermal_hwmon.h thermal: hwmon: move hwmon support to single file 2013-09-03 09:09:12 -04:00
user_space.c Thermal: build thermal governors into thermal_sys module 2013-04-14 23:28:43 +08:00
x86_pkg_temp_thermal.c thermal, x86-pkg-temp: Fix CPU hotplug callback registration 2014-03-20 13:43:47 +01:00