drivers: of-thermal: aggregate threshold of type across siblings

Iterate through the siblings of a TZ to figure out the trip point of a
given trip type. Find the min of the next higher temperature and
the max of the next lower temperature around the current temperature
helps set points of interest on the sensor.

This is particularly helpful for a sensor capable of polling for
temperature in the hardware and triggering an interrupt when those
thresholds are crossed.

Aggregate the trip thresholds across the sibling thermal zones inside
the set_trips callback in of thermal. This will ensure that when the
sensor drivers set_trips callback is called, it has the aggregated trip
high and trip low threshold of all sibling thermal zones.

Change-Id: I74fa57f81e9a691ede6b8d46a2e51f02bef91b6f
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
2 files changed