diff options
-rw-r--r-- | chip/lm4/fan.c | 10 | ||||
-rw-r--r-- | include/config.h | 3 |
2 files changed, 12 insertions, 1 deletions
diff --git a/chip/lm4/fan.c b/chip/lm4/fan.c index 955113ae57..8ec25bc1f8 100644 --- a/chip/lm4/fan.c +++ b/chip/lm4/fan.c @@ -165,10 +165,18 @@ void fan_channel_setup(int ch, unsigned int flags) static void fan_init(void) { + +#ifdef CONFIG_PWM_DSLEEP + + /* Enable the fan module and delay a few clocks */ + clock_enable_peripheral(CGC_OFFSET_FAN, 0x1, CGC_MODE_ALL); + +#else + /* Enable the fan module and delay a few clocks */ clock_enable_peripheral(CGC_OFFSET_FAN, 0x1, CGC_MODE_RUN | CGC_MODE_SLEEP); - +#endif /* Disable all fans */ LM4_FAN_FANCTL = 0; } diff --git a/include/config.h b/include/config.h index 6a9dbeb371..9b8d5e362c 100644 --- a/include/config.h +++ b/include/config.h @@ -681,6 +681,9 @@ /* Support PWM control */ #undef CONFIG_PWM +/* Support PWM control while in low-power idle */ +#undef CONFIG_PWM_DSLEEP + /*****************************************************************************/ /* Support PWM output to keyboard backlight */ #undef CONFIG_PWM_KBLIGHT |