summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVijay Hiremath <vijay.p.hiremath@intel.com>2015-07-15 19:15:14 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-07-21 01:34:21 +0000
commit26db470b39687b5abbbc8c5a5c8ac334a900fbae (patch)
tree5b7e41c76e82b87fbcb5ed82827b8672f880c17a
parentaaafd2da282d125ccea8cad1b9bea09639db33cd (diff)
downloadchrome-ec-26db470b39687b5abbbc8c5a5c8ac334a900fbae.tar.gz
Skylake: Add G3 sleep mode support
BUG=none TEST=Enabled the config and tested on Kunimitsu. Enter "shutdown -h now" form the Kernel console. Device goes to Sleep mode in G3 and charger LED turns off. BRANCH=none Change-Id: I962018dcfac2998ee0a11784adeceb09931b930d Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/286781 Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r--include/config.h3
-rw-r--r--power/skylake.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h
index 0fa815b695..2834c6bd8b 100644
--- a/include/config.h
+++ b/include/config.h
@@ -1121,6 +1121,9 @@
*/
#undef CONFIG_LOW_POWER_S0
+/* Support G3 sleep mode */
+#undef CONFIG_G3_SLEEP
+
/* Support LPC interface */
#undef CONFIG_LPC
diff --git a/power/skylake.c b/power/skylake.c
index 946d8e169b..ab4fb70c50 100644
--- a/power/skylake.c
+++ b/power/skylake.c
@@ -260,6 +260,9 @@ enum power_state power_handle_state(enum power_state state)
return POWER_S5G3;
case POWER_S5G3:
+#ifdef CONFIG_G3_SLEEP
+ gpio_set_level(GPIO_G3_SLEEP_EN, 1);
+#endif
return POWER_G3;
default: