summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2018-08-09 12:47:35 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-08-10 22:43:55 -0700
commit80cb4643522d5995ee20a27085fd01a9e41e3a6d (patch)
tree49cf4a1f0ece3a337060d281c1198a16cee55fef /test
parent6990ea55076669d74c899d86a8fd76640016b7c1 (diff)
downloadchrome-ec-80cb4643522d5995ee20a27085fd01a9e41e3a6d.tar.gz
Fan: Restore thermal control after sysjump
Currently, the fan thermal control is always disabled after sysjump. This patch makes the EC save the previous thermal control state before sysjump and restore it after sysjump. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=b:112293333 BRANCH=none TEST=Verify fan spins before sysjump, after sysjump, in OS on Akali. Change-Id: I2ffc2444e5995def0f0a9206a6863a4b55ba8bc1 Reviewed-on: https://chromium-review.googlesource.com/1169910 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/fan.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/fan.c b/test/fan.c
index c5e4c32fd8..6ce33ae495 100644
--- a/test/fan.c
+++ b/test/fan.c
@@ -31,8 +31,9 @@ static int test_fan(void)
sleep(2);
- /* With nothing else to do, fans default to full-on */
- TEST_ASSERT(fan_get_rpm_actual(0) == FAN_RPM(0)->rpm_max);
+ /* With nothing else to do, fans default to CONFIG_FAN_INIT_SPEED*/
+ TEST_ASSERT(fan_get_rpm_actual(0) ==
+ fan_percent_to_rpm(0, CONFIG_FAN_INIT_SPEED));
set_thermal_control_enabled(0, 1);