1
0
Fork 0

staging: ti-soc-thermal: fix condition to apply hyst

While updating talert thresholds, threshold cold must
always be lower than threshold hot. This patch fixes
the function ti_bandgap_update_alert_threshold to only
change the thresholds by applying a hysteresis when
they violate this condition.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
hifive-unleashed-5.1
Eduardo Valentin 2013-03-19 10:54:26 -04:00 committed by Greg Kroah-Hartman
parent 61603af326
commit f5d43b7a51
1 changed files with 1 additions and 1 deletions

View File

@ -406,7 +406,7 @@ static int ti_bandgap_update_alert_threshold(struct ti_bandgap *bgp, int id,
else
t_cold = val;
if (t_cold < t_hot) {
if (t_cold > t_hot) {
if (hot)
err = ti_bandgap_add_hyst(bgp, t_hot,
-ts_data->hyst_val,