thermal: of-thermal: disable passive polling when thermal zone is disabled
authorAnson Huang <Anson.Huang@nxp.com>
Mon, 30 Jul 2018 16:56:49 +0000 (00:56 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Oct 2018 00:00:57 +0000 (17:00 -0700)
commit083be6fbfdcb06b59792fd5b3468069daa1bf8c2
tree8ad2c152c6562a44bb61b4eabe576a074dc223c2
parent308206bd277099607d490b4c5337c1eee7d7a1dd
thermal: of-thermal: disable passive polling when thermal zone is disabled

[ Upstream commit 152395fd03d4ce1e535a75cdbf58105e50587611 ]

When thermal zone is in passive mode, disabling its mode from
sysfs is NOT taking effect at all, it is still polling the
temperature of the disabled thermal zone and handling all thermal
trips, it makes user confused. The disabling operation should
disable the thermal zone behavior completely, for both active and
passive mode, this patch clears the passive_delay when thermal
zone is disabled and restores it when it is enabled.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/thermal/of-thermal.c