summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2016-04-27 13:54:52 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-04-27 23:58:04 -0700
commitab27f42f5636af5fba50a871e391018cb1c885bf (patch)
treeb3c6e464b0b8e5a44b61c6e814220ef4293b0c92 /include
parent8d742588ade84d45ce6fe7ca069d6087fac6928c (diff)
downloadchrome-ec-ab27f42f5636af5fba50a871e391018cb1c885bf.tar.gz
pwm: Add PWM_CONFIG_DSLEEP config flag
Add PWM_CONFIG_DSLEEP PWM config flag, which can be set to keep a channel active during low-power idle / deep sleep. Currently it's supported by npcx and mec1322. BUG=chrome-os-partner:52783 BRANCH=glados TEST=Manual on chell w/ subsequent commit + CONFIG_LOW_POWER_S0. Verify KB backlight does not flicker during idle. Change-Id: Ib9df5879aaa7dfa5764de1583496de84d40d2bb5 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/341002 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/config.h6
-rw-r--r--include/pwm.h5
2 files changed, 7 insertions, 4 deletions
diff --git a/include/config.h b/include/config.h
index 9db99d5ddc..aab9952def 100644
--- a/include/config.h
+++ b/include/config.h
@@ -761,6 +761,9 @@
/* Number of cooling fans. Undef if none. */
#undef CONFIG_FANS
+/* Support fan control while in low-power idle */
+#undef CONFIG_FAN_DSLEEP
+
/*
* Replace the default fan_percent_to_rpm() function with a board-specific
* implementation in board.c
@@ -1468,9 +1471,6 @@
/* Support PWM control */
#undef CONFIG_PWM
-/* Support PWM control while in low-power idle */
-#undef CONFIG_PWM_DSLEEP
-
/* Define clock input to PWM module. */
#undef CONFIG_PWM_INPUT_LFCLK
diff --git a/include/pwm.h b/include/pwm.h
index 39835012e9..08cea7e43a 100644
--- a/include/pwm.h
+++ b/include/pwm.h
@@ -51,5 +51,8 @@ int pwm_get_duty(enum pwm_channel ch);
* addition to the primary output.
*/
#define PWM_CONFIG_COMPLEMENTARY_OUTPUT (1 << 3)
-
+/**
+ * PWM channel must stay active in low-power idle, if enabled.
+ */
+#define PWM_CONFIG_DSLEEP (1 << 4)
#endif /* __CROS_EC_PWM_H */