thermal/core: Add critical and hot ops
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 10 Dec 2020 12:15:11 +0000 (13:15 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Fri, 11 Dec 2020 13:11:13 +0000 (14:11 +0100)
commitd7203eedf4f68e9909fd489453168a9d26bf0c3d
treee01753f7ff94f984387e65e7f2386426aeb371bd
parent433178e75834dc35f1ae79b56ec2cf396f2c6f3c
thermal/core: Add critical and hot ops

Currently there is no way to the sensors to directly call an ops in
interrupt mode without calling thermal_zone_device_update assuming all
the trip points are defined.

A sensor may want to do something special if a trip point is hot or
critical.

This patch adds the critical and hot ops to the thermal zone device,
so a sensor can directly invoke them or let the thermal framework to
call the sensor specific ones.

Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
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-2-daniel.lezcano@linaro.org
drivers/thermal/thermal_core.c
include/linux/thermal.h