diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2018-10-30 10:55:40 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-11-19 19:13:54 -0800 |
commit | d38c44b7fd4b0fa3ab742f456994f1a1ef188094 (patch) | |
tree | 1e2280470cd48ace5584cd1cbbc5bbf240c5c9a5 /common/thermal.c | |
parent | 65b8dcf6da612c774d372c3c29e16923d7f6f379 (diff) | |
download | chrome-ec-d38c44b7fd4b0fa3ab742f456994f1a1ef188094.tar.gz |
Fan: Allow fan count to be set dynamically
Currently, the fan count is statically set. This patch allows it to
be set dynamically so that a single binary can support devices with
a different number of fans (including fan-less).
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b:116588924
BRANCH=none
TEST=Boot Fizz with OEM=8. Verify fan spins with OEM=1.
Change-Id: I77fc4e07ce2a1be2e288df145857a79c0003542f
Reviewed-on: https://chromium-review.googlesource.com/1308257
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'common/thermal.c')
-rw-r--r-- | common/thermal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/thermal.c b/common/thermal.c index 60101516da..4426aa9ae9 100644 --- a/common/thermal.c +++ b/common/thermal.c @@ -172,7 +172,7 @@ static void thermal_control(void) * profiles to each fan - in case one fan cools the CPU while another * cools the radios or battery. */ - for (i = 0; i < CONFIG_FANS; i++) + for (i = 0; i < fan_get_count(); i++) fan_set_percent_needed(i, fmax); #endif } |