diff options
-rw-r--r-- | board/rambi/board.h | 1 | ||||
-rw-r--r-- | include/config.h | 5 | ||||
-rw-r--r-- | power/baytrail.c | 9 |
3 files changed, 15 insertions, 0 deletions
diff --git a/board/rambi/board.h b/board/rambi/board.h index d3ce348b7b..656e716236 100644 --- a/board/rambi/board.h +++ b/board/rambi/board.h @@ -39,6 +39,7 @@ #define CONFIG_USB_PORT_POWER_SMART_SIMPLE #define CONFIG_VBOOT_HASH #define CONFIG_WIRELESS +#define CONFIG_WIRELESS_SUSPEND_ENABLE_WIFI #ifndef __ASSEMBLER__ diff --git a/include/config.h b/include/config.h index f3035c2fa9..5775ad8d58 100644 --- a/include/config.h +++ b/include/config.h @@ -773,6 +773,11 @@ #undef CONFIG_WIRELESS /* + * Support for WiFi devices that must remain powered in suspend. + */ +#undef CONFIG_WIRELESS_SUSPEND_ENABLE_WIFI + +/* * Write protect signal is active-high. If this is defined, there must be a * GPIO named GPIO_WP; if not defined, there must be a GPIO names GPIO_WP_L. */ diff --git a/power/baytrail.c b/power/baytrail.c index 3cb6d5df7e..e938f9298e 100644 --- a/power/baytrail.c +++ b/power/baytrail.c @@ -292,8 +292,14 @@ enum power_state power_handle_state(enum power_state state) /* Disable +CPU_CORE */ gpio_set_level(GPIO_VCORE_EN, 0); +#ifdef CONFIG_WIRELESS_SUSPEND_ENABLE_WIFI + /* Disable WWAN, but leave WiFi on */ + wireless_enable(EC_WIRELESS_SWITCH_WLAN | + EC_WIRELESS_SWITCH_WLAN_POWER); +#else /* Disable wireless */ wireless_enable(0); +#endif /* * Enable idle task deep sleep. Allow the low power idle task @@ -316,6 +322,9 @@ enum power_state power_handle_state(enum power_state state) /* Call hooks before we remove power rails */ hook_notify(HOOK_CHIPSET_SHUTDOWN); + /* Disable wireless */ + wireless_enable(0); + /* Disable touchpad power */ gpio_set_level(GPIO_ENABLE_TOUCHPAD, 0); |