Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b03f130b authored by Ram Chandrasekar's avatar Ram Chandrasekar
Browse files

drivers: thermal: Reprogram the thresholds for the set_trips callback



With virtual thermal zones monitoring the same sensor, there could be a
case where two thermal zones can look for the same trip threshold. The
sensor driver when notifying the thermal core for the trip threshold,
there is a possibility that by the time the second zone reads the
temperature, the temperature might have gone below the trip threshold
because of the mitigation from first thermal zone. In that case, the
second thermal zone will re-program the same trip thresholds. The
current optimization in the set_trips callback will optimize this by not
programming the trip thresholds again. But for sensor drivers working
with multiple thermal-zones can expect the same threshold be configured
again.

Remove the optimization in the set_trips to skip the threshold
programming if it the same as previous threshold. The optimzation will
make more sense in the sensor driver to skip the new thresholds if they
are same as the current active thresholds.

Change-Id: I812eb2c1303a23cd9aa33442e9fff332e71ec4ec
Signed-off-by: default avatarRam Chandrasekar <rkumbako@codeaurora.org>
parent a66af145
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment