linux-stable/drivers/thermal
Zhang Rui ff140fea84 Thermal: handle thermal zone device properly during system sleep
Current thermal code does not handle system sleep well because
1. the cooling device cooling state may be changed during suspend
2. the previous temperature reading becomes invalid after resumed because
   it is got before system sleep
3. updating thermal zone device during suspending/resuming
   is wrong because some devices may have already been suspended
   or may have not been resumed.

Thus, the proper way to do this is to cancel all thermal zone
device update requirements during suspend/resume, and after all
the devices have been resumed, reset and update every registered
thermal zone devices.

This also fixes a regression introduced by:
Commit 19593a1fb1 ("ACPI / fan: convert to platform driver")
Because, with above commit applied, all the fan devices are attached
to the acpi_general_pm_domain, and they are turned on by the pm_domain
automatically after resume, without the awareness of thermal core.

CC: <stable@vger.kernel.org> #3.18+
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=78201
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=91411
Tested-by: Manuel Krause <manuelkrause@netscape.net>
Tested-by: szegad <szegadlo@poczta.onet.pl>
Tested-by: prash <prash.n.rao@gmail.com>
Tested-by: amish <ammdispose-arch@yahoo.com>
Tested-by: Matthias <morpheusxyz123@yahoo.de>
Reviewed-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
2015-12-29 15:59:53 +08:00
..
int340x_thermal thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
samsung Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2015-11-11 09:03:01 -08:00
st Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2015-09-11 16:13:47 -07:00
ti-soc-thermal thermal: ti-soc-thermal: add OMAP36xx support 2015-09-29 14:13:19 -07:00
armada_thermal.c thermal: armada: Fix possible overflow in the Armada 380 thermal sensor formula 2015-10-30 11:33:23 -07:00
clock_cooling.c thermal: introduce clock cooling device 2014-11-20 10:43:16 -04:00
cpu_cooling.c thermal: cpu_cooling: Remove usage of devm functions 2015-10-10 11:32:21 +08:00
db8500_cpufreq_cooling.c thermal: db8500_cpufreq_cooling: Fix module autoload for OF platform driver 2015-09-13 20:26:19 -07:00
db8500_thermal.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
devfreq_cooling.c devfreq_cooling: return on allocation failure 2015-11-04 11:06:29 -08:00
dove_thermal.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
fair_share.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
gov_bang_bang.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
hisi_thermal.c Merge branches 'thermal-core' and 'thermal-intel' of .git into next 2015-09-02 10:08:02 +08:00
imx_thermal.c imx: thermal: use CPU temperature grade info for thresholds 2015-11-23 16:38:40 -08:00
intel_pch_thermal.c thermal: fix intel PCH thermal driver mismerge 2015-09-11 20:06:59 -07:00
intel_powerclamp.c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2015-09-11 16:13:47 -07:00
intel_quark_dts_thermal.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
intel_soc_dts_iosf.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
intel_soc_dts_iosf.h Thermal: Intel SoC: DTS thermal IOSF core 2015-05-01 11:20:42 +08:00
intel_soc_dts_thermal.c Thermal: Intel SoC: DTS thermal use common APIs 2015-05-01 11:20:42 +08:00
Kconfig Revert "thermal: qcom_spmi: allow compile test" 2015-11-23 15:33:56 -08:00
kirkwood_thermal.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
Makefile thermal: Add devfreq cooling 2015-10-30 10:21:01 -07:00
of-thermal.c thermal: of-thermal: Reduce log level for message when can't fine thermal zone 2015-11-16 10:49:17 -08:00
power_allocator.c thermal: power_allocator: Use temperature reading from tz 2015-11-12 10:47:24 -08:00
qcom-spmi-temp-alarm.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
rcar_thermal.c thermal: rcar_thermal: remove redundant operation 2015-11-16 10:53:08 -08:00
rockchip_thermal.c thermal: rockchip: Support the RK3368 SoCs in thermal driver 2015-11-12 10:21:30 -08:00
spear_thermal.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
step_wise.c Thermal: initialize thermal zone device correctly 2015-12-29 15:59:44 +08:00
tegra_soctherm.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
thermal_core.c Thermal: handle thermal zone device properly during system sleep 2015-12-29 15:59:53 +08:00
thermal_core.h Thermal: initialize thermal zone device correctly 2015-12-29 15:59:44 +08:00
thermal_hwmon.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08: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: consistently use int for temperatures 2015-08-03 23:15:50 +08:00