diff options
author | Henry Hsu <Henry.Hsu@quantatw.com> | 2014-02-19 09:31:38 +0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-03-29 02:20:36 +0000 |
commit | dc6a36d371056d2af6026e63b1ebfd9e4950b10a (patch) | |
tree | c32a48e8baf33c3479b538645b13a1e5a5ef4304 | |
parent | 352b07fcdd0c369d903946aa16b6e05b6ed2ed13 (diff) | |
download | chrome-ec-stabilize-5712.8.B.tar.gz |
Add pwm support while in low-power idlestabilize-5712.8.B
BUG=None
BRANCH=None
TEST=Enable this with pwm led board, the pwm led works even EC
low-power idle.
Change-Id: Ic808104d8e38b1f9074682ced41412c6af050efe
Signed-off-by: Henry Hsu <Henry.Hsu@quantatw.com>
Reviewed-on: https://chromium-review.googlesource.com/186951
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/192181
Commit-Queue: Dave Parker <dparker@chromium.org>
Tested-by: Dave Parker <dparker@chromium.org>
-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 |