Skip to content
Commit 191b0754 authored by Michele Di Giorgio's avatar Michele Di Giorgio Committed by Zhang Rui
Browse files

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: default avatarMichele Di Giorgio <michele.digiorgio@arm.com>
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
parent 04974df8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment