]> git.baikalelectronics.ru Git - kernel.git/commit
thermal: check validity get_trip_hyst function pointer in bang-bang governor
authorMichele Di Giorgio <michele.digiorgio@arm.com>
Wed, 11 May 2016 09:49:07 +0000 (10:49 +0100)
committerZhang Rui <rui.zhang@intel.com>
Mon, 16 May 2016 05:21:11 +0000 (13:21 +0800)
commit014b0b6797c024a497198ef919bb7d1656f675ed
tree92a7a40aff62481b8bef2949827287932cb9d1cc
parent92c210dea15db4dd0ee386a76eaf2970675f69b5
thermal: check validity get_trip_hyst function pointer in bang-bang governor

Bang-bang thermal governor uses trip point hysteresis to make decisions.
Hysteresis is a required property in the device tree for trip points, but it is
an optional thermal zone device operation. Hence, we need to check whether the
function pointer is valid or not.

If it is not available, we assume the hysteresis to be zero. Consequently, a
highly varying temperature will make the governor continuosly switch a cooling
device ON and OFF.

CC: Zhang Rui <rui.zhang@intel.com>
CC: Eduardo Valentin <edubezval@gmail.com>
CC: Peter Feuerer <peter@piie.net>
Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/gov_bang_bang.c