summaryrefslogtreecommitdiff
path: root/chip/npcx/fan.c
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2018-10-30 10:55:40 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-11-19 19:13:54 -0800
commitd38c44b7fd4b0fa3ab742f456994f1a1ef188094 (patch)
tree1e2280470cd48ace5584cd1cbbc5bbf240c5c9a5 /chip/npcx/fan.c
parent65b8dcf6da612c774d372c3c29e16923d7f6f379 (diff)
downloadchrome-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 'chip/npcx/fan.c')
-rw-r--r--chip/npcx/fan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/chip/npcx/fan.c b/chip/npcx/fan.c
index c14d4e20ed..c49707592b 100644
--- a/chip/npcx/fan.c
+++ b/chip/npcx/fan.c
@@ -235,7 +235,7 @@ static int fan_all_disabled(void)
{
int ch;
- for (ch = 0; ch < CONFIG_FANS; ch++)
+ for (ch = 0; ch < fan_get_count(); ch++)
if (fan_status[ch].auto_status != FAN_STATUS_STOPPED)
return 0;
return 1;