aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/thermal.h
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2020-12-10 13:15:10 +0100
committerDaniel Lezcano <daniel.lezcano@linaro.org>2020-12-11 14:11:13 +0100
commit433178e75834dc35f1ae79b56ec2cf396f2c6f3c (patch)
tree88332df3f1512e65be5f1fcccbc29cc7d466891a /include/linux/thermal.h
parentdrm/panfrost: Register devfreq cooling and attempt to add Energy Model (diff)
downloadlinux-dev-433178e75834dc35f1ae79b56ec2cf396f2c6f3c.tar.xz
linux-dev-433178e75834dc35f1ae79b56ec2cf396f2c6f3c.zip
thermal/core: Emit a warning if the thermal zone is updated without ops
The actual code is silently ignoring a thermal zone update when a driver is requesting it without a get_temp ops set. That looks not correct, as the caller should not have called this function if the thermal zone is unable to read the temperature. That makes the code less robust as the check won't detect the driver is inconsistently using the thermal API and that does not help to improve the framework as these circumvolutions hide the problem at the source. In order to detect the situation when it happens, let's add a warning when the update is requested without the get_temp() ops set. Any warning emitted will have to be fixed at the source of the problem: the caller must not call thermal_zone_device_update if there is not get_temp callback set. Cc: Thara Gopinath <thara.gopinath@linaro.org> Cc: Amit Kucheria <amitk@kernel.org> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Link: https://lore.kernel.org/r/20201210121514.25760-1-daniel.lezcano@linaro.org
Diffstat (limited to 'include/linux/thermal.h')
0 files changed, 0 insertions, 0 deletions