thermal: qpnp-adc-tm: Add multiple client request support

Add threshold aggregation to support multiple kernel clients
to set thresholds and receive threshold notification once
the thresholds are crossed.
Modify the existing driver to support multiple clients
to set thresholds from kernel space. The existing clients
include setting threshold notification for battery voltage,
pmic die and battery temperature. Based on the clients request
the thresholds are aggregated and the maximum of active
lower_threshold and minimum of higher_threshold is applied as
thresholds and the corresponding clients whose thresholds are
crossed are notified. After notification the next set of
active thresholds are applied and thresholds are re-armed.

Change-Id: I7ab14516af8062c6307ffe719a5cb9c76430fa6e
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
1 file changed