diff options
author | Gerrit <chrome-bot@google.com> | 2012-03-15 17:59:33 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2012-03-15 17:59:33 -0700 |
commit | 7d1884ee06793b776a8b8af3508e6cb6b7027b3f (patch) | |
tree | 24a77c87178a35138ffefe0883dad1b29a4532ae | |
parent | c72f66c050b7754c36436583272965b9ca4fd850 (diff) | |
parent | 826e811493c5f6ead44a4a77ec39b2d3b3a9e042 (diff) | |
download | chrome-ec-7d1884ee06793b776a8b8af3508e6cb6b7027b3f.tar.gz |
Merge "Prevent fan from keep turning on and off."
-rw-r--r-- | common/thermal.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/common/thermal.c b/common/thermal.c index 650b6ca5c3..1bdeaadaec 100644 --- a/common/thermal.c +++ b/common/thermal.c @@ -130,7 +130,15 @@ static inline void update_and_check_stat(int temp, overheated[threshold_id] = 1; } } - else + else if (ot_count[sensor_id][threshold_id] >= 10 && + temp >= threshold - 3) { + /* Once the threshold is reached, only if the temperature + * drops to 3 degrees below threshold do we deassert + * overheated signal. This is to prevent temperature + * oscillating around the threshold causing threshold + * keep being triggered. */ + overheated[threshold_id] = 1; + } else ot_count[sensor_id][threshold_id] = 0; } |