From d64bb99149e013a02b0db6ac1313080ad298f2f0 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Tue, 17 Feb 2015 12:27:04 -0800 Subject: samus: Only update fan speeds every N seconds This adds CONFIG_FAN_UPDATE_PERIOD to limit the frequency at which the fan speeds are updated. Short version: the CPU core temp fluctuates rapidly, causing the fans turn off and on annoyingly often (assuming you have good hearing and are in a quiet room). With this CL, we limit the speed changes to only once every N seconds. N should be long enough to be less annoying, yet short enough that the CPU doesn't overheat while we're not looking. BUG=chrome-os-partner:34789 BRANCH=ToT,samus TEST=manual Let it sit quietly, then visit a busy webpage, then let it sit a while. The fan speed should only change every 10 seconds or so, not every second. Change-Id: Id985350394f24d56dc4a1e51af09487ac643285b Signed-off-by: Bill Richardson Reviewed-on: https://chromium-review.googlesource.com/250501 Reviewed-by: Duncan Laurie --- include/config.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/config.h b/include/config.h index 9e4e1999f7..9fb9508644 100644 --- a/include/config.h +++ b/include/config.h @@ -551,6 +551,13 @@ */ #undef CONFIG_FAN_RPM_CUSTOM +/* + * We normally check and update the fans once per second (HOOK_SECOND). If this + * is #defined to a postive integer N, we will only update the fans every N + * seconds instead. + */ +#undef CONFIG_FAN_UPDATE_PERIOD + /*****************************************************************************/ /* Flash configuration */ -- cgit v1.2.1