diff options
Diffstat (limited to 'common/throttle_ap.c')
-rw-r--r-- | common/throttle_ap.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/common/throttle_ap.c b/common/throttle_ap.c index 52b9c96127..8a4314db4d 100644 --- a/common/throttle_ap.c +++ b/common/throttle_ap.c @@ -8,6 +8,7 @@ #include "chipset.h" #include "common.h" #include "console.h" +#include "dptf.h" #include "hooks.h" #include "host_command.h" #include "task.h" @@ -96,10 +97,18 @@ static void prochot_input_deferred(void) debounced_prochot_in = prochot_in; - if (debounced_prochot_in) + if (debounced_prochot_in) { CPRINTS("External PROCHOT assertion detected"); - else +#ifdef CONFIG_FANS + dptf_set_fan_duty_target(100); +#endif + } else { CPRINTS("External PROCHOT condition cleared"); +#ifdef CONFIG_FANS + /* Revert to automatic control of the fan */ + dptf_set_fan_duty_target(-1); +#endif + } } DECLARE_DEFERRED(prochot_input_deferred); |