summaryrefslogtreecommitdiff
path: root/power
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2015-07-14 12:39:51 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-07-15 02:05:54 +0000
commit88ef0bc44e1b3296a75e17011ae2ffb11883f8f7 (patch)
tree0a5946a9cb59c27af293ab0aecf7f813b109b708 /power
parentac1cba419ab507163dcb6dc9d6be1401f3f1f518 (diff)
downloadchrome-ec-88ef0bc44e1b3296a75e17011ae2ffb11883f8f7.tar.gz
skylake: Disable power rails and components when appropriate
- Disable USB, wireless and audio power rail when powering down from S3 - Disable sensor power rail and display backlight when powering down from S0 BUG=chrome-os-partner:42104 TEST=Manual on Glados. Boot AP, verify that display backlight and USB are functional. BRANCH=None Change-Id: I2879f57db555753b280e785df3d2cc967c152f21 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/285545 Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'power')
-rw-r--r--power/skylake.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/power/skylake.c b/power/skylake.c
index 7ae1a3cc43..946d8e169b 100644
--- a/power/skylake.c
+++ b/power/skylake.c
@@ -191,8 +191,10 @@ enum power_state power_handle_state(enum power_state state)
return POWER_S5G3;
}
- /* Enable TP so that it can wake the system */
+ /* Enable TP + USB so that they can wake the system */
gpio_set_level(GPIO_ENABLE_TOUCHPAD, 1);
+ gpio_set_level(GPIO_USB1_ENABLE, 1);
+ gpio_set_level(GPIO_USB2_ENABLE, 1);
/* Call hooks now that rails are up */
hook_notify(HOOK_CHIPSET_STARTUP);
@@ -205,6 +207,8 @@ enum power_state power_handle_state(enum power_state state)
return POWER_S3S5;
}
+ gpio_set_level(GPIO_ENABLE_BACKLIGHT, 1);
+
/* Enable wireless */
wireless_set_state(WIRELESS_ON);
@@ -229,6 +233,8 @@ enum power_state power_handle_state(enum power_state state)
/* Call hooks before we remove power rails */
hook_notify(HOOK_CHIPSET_SUSPEND);
+ gpio_set_level(GPIO_ENABLE_BACKLIGHT, 0);
+
/* Suspend wireless */
wireless_set_state(WIRELESS_SUSPEND);
@@ -248,6 +254,8 @@ enum power_state power_handle_state(enum power_state state)
wireless_set_state(WIRELESS_OFF);
gpio_set_level(GPIO_ENABLE_TOUCHPAD, 0);
+ gpio_set_level(GPIO_USB1_ENABLE, 0);
+ gpio_set_level(GPIO_USB2_ENABLE, 0);
return POWER_S5G3;