android_kernel_samsung_msm8976/drivers/thermal
Krzysztof Kozlowski 6d4337eb09 thermal: hwmon: Properly report critical temperature in sysfs
commit f37fabb8643eaf8e3b613333a72f683770c85eca 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>
[wt: s/thermal_hwmon.c/thermal_core.c in 3.10]

Signed-off-by: Willy Tarreau <w@1wt.eu>
2019-07-27 21:42:22 +02:00
..
Kconfig Import latest Samsung release 2017-04-18 03:43:52 +02:00
Makefile Import latest Samsung release 2017-04-18 03:43:52 +02:00
armada_thermal.c
cpu_cooling.c
db8500_cpufreq_cooling.c
db8500_thermal.c
dove_thermal.c
exynos_thermal.c
fair_share.c
intel_powerclamp.c
kirkwood_thermal.c
lmh_interface.c msm: limits: Fix error handling to free up memory 2015-09-22 05:04:33 -07:00
lmh_interface.h
lmh_lite.c msm: lmh_lite: Pass proper size for dma memory free API call 2016-03-11 03:45:02 -08:00
msm-tsens.c thermal: tsens: Enable valid status bit check 2015-10-15 04:29:37 -07:00
msm_thermal-dev.c Merge tag 'LA.BR.1.3.6-03910-8976.0' of https://source.codeaurora.org/quic/la/kernel/msm-3.10 into HEAD 2017-05-26 13:28:48 +02:00
msm_thermal.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
qpnp-adc-tm.c
qpnp-temp-alarm.c
rcar_thermal.c
spear_thermal.c
ss_thermal.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
ss_thermal.h Import latest Samsung release 2017-04-18 03:43:52 +02:00
step_wise.c
supply_lm_core.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
thermal_core.c thermal: hwmon: Properly report critical temperature in sysfs 2019-07-27 21:42:22 +02:00
thermal_core.h
user_space.c