summaryrefslogtreecommitdiff
path: root/board/volteer_ish
diff options
context:
space:
mode:
authorRichard Yeh <rcy@google.com>2022-11-28 02:02:16 +0000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-01-31 04:00:19 +0000
commitda770c44e6481758085af8d17efe731622a92c66 (patch)
tree1545867cbfb59cf73bbdffa9ddeb5f9417bf6e11 /board/volteer_ish
parent9166b2b0024f95231d0f4c89abea34259ff07af5 (diff)
downloadchrome-ec-da770c44e6481758085af8d17efe731622a92c66.tar.gz
fan: Rewrite and test the most common custom fan_percent_to_rpm.
temp_ratio_to_rpm_hysteresis uses a sorted fan_table containing a mapping of temp_ratio (percent, 0-100) to fan rpm. This clarifies the relationship of temperature to fan speed, while reducing the number of static variables. The existing temp_ratio expressing the percentage of cooling needed (temperature from temp_fan_off to temp_fan_max) suggests the possibility that a proportional-integral-derivative (PID) feedback controller might have been considered; but the default implementation is purely linear (mapping to fan speed from min to max) and this stepwise one just enables hysteresis --- different speeds when the board is warming up than when cooling down. The hysteresis attempts to avoid oscillations in temperature and fan speed. This refactoring is in preparation for reusing this implementation for {ambassador, genesis, moonbuggy, scout}. {kalista, berknip, chronicler, dewatt, endeavour, ezkinil, fizz} define CONFIG_FAN_RPM_CUSTOM and use this or nearly this implementation of a fan_percent_to_rpm with hysteresis. {chronicler} also performs boxcar smoothing of the input. {osiris}, which has two fans, and {jinlon, redrix, and other boards with multiple sensors}, use a similar but not exactly the same implementation, and would need additional abstraction. See: https://source.chromium.org/search?q=f:ec%2Fb%20fan_step%20-f:board.c BRANCH=refactor-fan-percent-to-rpm BUG=b:252966838,b:191187610,chromium:1383859 TEST=make -j run-fan && make -j buildall && make -j runhosttests Signed-off-by: Richard Yeh <rcy@google.com> Change-Id: I50ad4d78ac1145f92573a417646c1f57b8945463 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4021951 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> (cherry picked from commit 62c3a651befeb8d9b3ad03994b23b579d92c20d8) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4197674 Reviewed-by: Kyle Williams <kdgwill@chromium.org>
Diffstat (limited to 'board/volteer_ish')
0 files changed, 0 insertions, 0 deletions