thermal-core: Re-program the thresholds every time
Program the thresholds every time regardless so we guarantee the threshold is programmed. Previous code didn't reprogram the threshold if it was already believed to be set. This check can be wrong is some cornor cases. Change-Id: Ie94cb40302c585b2b779da57ad70d32cc2445c96 Signed-off-by: Jeff Bernard <jbernard@codeaurora.org>
This commit is contained in:
parent
5059c6fe71
commit
6a0a9b4bbf
1 changed files with 2 additions and 4 deletions
|
@ -303,8 +303,7 @@ static int __update_sensor_thresholds(struct sensor_info *sensor)
|
||||||
sensor->sensor_id, max_of_low_thresh,
|
sensor->sensor_id, max_of_low_thresh,
|
||||||
min_of_high_thresh);
|
min_of_high_thresh);
|
||||||
|
|
||||||
if ((min_of_high_thresh != sensor->threshold_max) &&
|
if (min_of_high_thresh != LONG_MAX) {
|
||||||
(min_of_high_thresh != LONG_MAX)) {
|
|
||||||
ret = sensor->tz->ops->set_trip_temp(sensor->tz,
|
ret = sensor->tz->ops->set_trip_temp(sensor->tz,
|
||||||
sensor->max_idx, min_of_high_thresh);
|
sensor->max_idx, min_of_high_thresh);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
@ -325,8 +324,7 @@ static int __update_sensor_thresholds(struct sensor_info *sensor)
|
||||||
goto update_done;
|
goto update_done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((max_of_low_thresh != sensor->threshold_min) &&
|
if (max_of_low_thresh != LONG_MIN) {
|
||||||
(max_of_low_thresh != LONG_MIN)) {
|
|
||||||
ret = sensor->tz->ops->set_trip_temp(sensor->tz,
|
ret = sensor->tz->ops->set_trip_temp(sensor->tz,
|
||||||
sensor->min_idx, max_of_low_thresh);
|
sensor->min_idx, max_of_low_thresh);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue