diff options
-rw-r--r-- | chip/lm4/fan.c | 2 | ||||
-rw-r--r-- | common/thermal.c | 2 | ||||
-rw-r--r-- | test/test_config.h | 6 |
3 files changed, 9 insertions, 1 deletions
diff --git a/chip/lm4/fan.c b/chip/lm4/fan.c index cf109573ff..663bcdab1d 100644 --- a/chip/lm4/fan.c +++ b/chip/lm4/fan.c @@ -134,7 +134,7 @@ static void fan_set_thermal_control_enabled(int enable) } /* The thermal task will only call this function with pct in [0,100]. */ -void pwm_fan_set_percent_needed(int pct) +test_mockable void pwm_fan_set_percent_needed(int pct) { int rpm; diff --git a/common/thermal.c b/common/thermal.c index c51b5dc01a..c6c49868d2 100644 --- a/common/thermal.c +++ b/common/thermal.c @@ -146,8 +146,10 @@ static void thermal_control(void) throttle_ap(THROTTLE_OFF, THROTTLE_SOFT, THROTTLE_SRC_THERMAL); } +#ifdef CONFIG_FAN /* Max fan needed is what's needed. */ pwm_fan_set_percent_needed(fmax); +#endif } /* Wait until after the sensors have been read */ diff --git a/test/test_config.h b/test/test_config.h index 0310e80e40..28aedd1474 100644 --- a/test/test_config.h +++ b/test/test_config.h @@ -32,6 +32,9 @@ int board_discharge_on_ac(int enabled); #ifdef TEST_thermal #define CONFIG_CHIPSET_CAN_THROTTLE +#define CONFIG_FAN +#define CONFIG_FAN_RPM_MAX 5000 +#define CONFIG_FAN_RPM_MIN 1000 #define CONFIG_TEMP_SENSOR #endif @@ -42,6 +45,9 @@ int board_discharge_on_ac(int enabled); #define CONFIG_CHARGER_INPUT_CURRENT 4032 #define CONFIG_CHIPSET_CAN_THROTTLE #define CONFIG_EXTPOWER_FALCO +#define CONFIG_FAN +#define CONFIG_FAN_RPM_MAX 5000 +#define CONFIG_FAN_RPM_MIN 1000 #define CONFIG_TEMP_SENSOR #define I2C_PORT_BATTERY 1 #define I2C_PORT_CHARGER 1 |