summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2018-06-21 11:19:22 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-07-06 18:48:46 -0700
commit927fd1d3bf91bb7ebcaccee8d38e00e49641bc23 (patch)
treef8c264cfec63ec9a662b9b4d1b59ddc6c094c57e
parent7d26ae49bffcf269df82df7d0fee00e8c3341166 (diff)
downloadchrome-ec-927fd1d3bf91bb7ebcaccee8d38e00e49641bc23.tar.gz
fan: Don't enable or disable thermal control on resume
We don't need to enable or disable thermal control on the resume path. It should be already enabled by pwm_fan_init on cold boot or by pwm_fan_S3_S5 on warm reboot. If it needs to be disabled, DPTF and host command will do so Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=none BRANCH=none TEST=Verify fan spins as expected on Nami and Fizz. Change-Id: If6e4ecdf328b24cc5ba86dbc3bc2824610fcd340 Reviewed-on: https://chromium-review.googlesource.com/1110485 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r--common/fan.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/common/fan.c b/common/fan.c
index 6b618575a6..29c7d508a9 100644
--- a/common/fan.c
+++ b/common/fan.c
@@ -510,11 +510,10 @@ static void pwm_fan_resume(void)
{
int fan;
for (fan = 0; fan < CONFIG_FANS; fan++) {
-#ifdef CONFIG_FAN_RPM_CUSTOM
- set_thermal_control_enabled(fan, 1);
-#else
- set_thermal_control_enabled(fan, 0);
-#endif
+ /* We don't enable or disable thermal control here.
+ * It should be already enabled by pwm_fan_init on cold boot
+ * or by pwm_fan_S3_S5 on warm reboot. If it needs
+ * to be disabled, DPTF and host command will do so. */
fan_set_rpm_target(FAN_CH(fan),
fan_percent_to_rpm(FAN_CH(fan),
CONFIG_FAN_INIT_SPEED));