mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 02:35:28 +00:00
baytrail: Add config option to enable WiFi in suspend
Some WiFi devices do not tolerate losing power in suspend and will not function properly after resume if they have lost power. Enable this on the Rambi device. BUG=chrome-os-partner:24114 BRANCH=baytrail TEST=complete mutiple successful suspend/resume cycles on rambi and ensure that wifi continues to function and not cause a crash. Change-Id: Id421f3138e429b247bfb3f5ffb92a06c0353bb97 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/183047 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
2c0292958f
commit
064624cc2d
@@ -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__
|
||||
|
||||
|
||||
@@ -772,6 +772,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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user