]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Thermal: do not clear passive state during system sleep
authorWei Wang <wvw@google.com>
Wed, 7 Nov 2018 22:36:11 +0000 (14:36 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 18:46:01 +0000 (19:46 +0100)
commit3f5d37ba66c820d7255f61a86d51fe969cc28d05
treeb9d14e97e7a04e361b99f0876ba928161b99bbba
parent6636dc5e01c613f032c9140b4bd113e783c24546
Thermal: do not clear passive state during system sleep

[ Upstream commit 964f4843a455d2ffb199512b08be8d5f077c4cac ]

commit ff140fea847e ("Thermal: handle thermal zone device properly
during system sleep") added PM hook to call thermal zone reset during
sleep. However resetting thermal zone will also clear the passive state
and thus cancel the polling queue which leads the passive cooling device
state not being cleared properly after sleep.

thermal_pm_notify => thermal_zone_device_reset set passive to 0
thermal_zone_trip_update will skip update passive as `old_target ==
instance->target'.
monitor_thermal_zone => thermal_zone_device_set_polling will cancel
tz->poll_queue, so the cooling device state will not be changed
afterwards.

Reported-by: Kame Wang <kamewang@google.com>
Signed-off-by: Wei Wang <wvw@google.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/thermal/thermal_core.c