summaryrefslogtreecommitdiff
path: root/chip
diff options
context:
space:
mode:
authorDevin Lu <Devin.Lu@quantatw.com>2022-08-19 11:09:21 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-08-23 01:44:02 +0000
commit788d105544b025c5e864554c3b8013c6cb8368b3 (patch)
treebc0721ce6f97d52a603e6ead3c63efb9ae86738d /chip
parentb648fac2c617ba35088b2ad358fb275587161d4f (diff)
downloadchrome-ec-788d105544b025c5e864554c3b8013c6cb8368b3.tar.gz
npcx: fan: Introduce CONFIG_FAN_BYPASS_SLOW_RESPONSE for slow response fan
CL:3539776 fine tune the fan control to avoid fan pwm is too aggressive for slow response fan. However, this fan control mechanism will affect normal response fan with another device. Add a new CONFIG_FAN_BYPASS_SLOW_RESPONSE for option. BUG=b:237237424 BRANCH=none TEST=On Redrix. Test FAN is working with expected rpm while startup. TEST=make buildall Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I9c5388dbfe983b9a5f37f7bcb9217e92eab833ba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3840993 Tested-by: Devin Lu <devin.lu@quantatw.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Devin Lu <devin.lu@quantatw.com> Reviewed-by: CH Lin <chlin56@nuvoton.com>
Diffstat (limited to 'chip')
-rw-r--r--chip/npcx/fan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/chip/npcx/fan.c b/chip/npcx/fan.c
index bb99c24afd..512705b74b 100644
--- a/chip/npcx/fan.c
+++ b/chip/npcx/fan.c
@@ -299,7 +299,8 @@ enum fan_status fan_smart_control(int ch, int rpm_actual, int rpm_target)
* In this case, don't step the PWM duty too aggressively.
* See b:225208265 for more detail.
*/
- if (rpm_pre[ch] == 0 && rpm_actual == 0) {
+ if (rpm_pre[ch] == 0 && rpm_actual == 0 &&
+ IS_ENABLED(CONFIG_FAN_BYPASS_SLOW_RESPONSE)) {
rpm_diff = RPM_MARGIN(rpm_target) + 1;
} else {
rpm_diff = rpm_target - rpm_actual;