mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-06 15:01:35 +00:00
reef: enable WiFi power control support
add a new config flag to support active low power control signal
BUG=chrome-os-partner:53665
BRANCH=none
TEST=Use multimeter to check for voltage present on the WiFi slot.
Use gpioget to check GPIO state in S0 (on) and S5 (off).
Change-Id: Ibeca88d16f39eadd7f29589cd3cd15aeef0dd524
Signed-off-by: Kevin K Wong <kevin.k.wong@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/347085
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
This commit is contained in:
@@ -80,6 +80,9 @@
|
||||
/* #define CONFIG_TEMP_SENSOR */
|
||||
#define CONFIG_UART_HOST 0
|
||||
#define CONFIG_VBOOT_HASH
|
||||
#define CONFIG_WIRELESS
|
||||
#define CONFIG_WLAN_POWER_ACTIVE_LOW
|
||||
#define WIRELESS_GPIO_WLAN_POWER GPIO_WIRELESS_GPIO_WLAN_POWER
|
||||
|
||||
#define CONFIG_FLASH_SIZE 524288
|
||||
#define CONFIG_SPI_FLASH_W25Q40 /* FIXME: Should be GD25LQ40? */
|
||||
|
||||
@@ -49,8 +49,13 @@ static void wireless_enable(int flags)
|
||||
#endif
|
||||
|
||||
#ifdef WIRELESS_GPIO_WLAN_POWER
|
||||
#ifndef CONFIG_WLAN_POWER_ACTIVE_LOW
|
||||
gpio_set_level(WIRELESS_GPIO_WLAN_POWER,
|
||||
flags & EC_WIRELESS_SWITCH_WLAN_POWER);
|
||||
#else
|
||||
gpio_set_level(WIRELESS_GPIO_WLAN_POWER,
|
||||
!(flags & EC_WIRELESS_SWITCH_WLAN_POWER));
|
||||
#endif /* CONFIG_WLAN_POWER_ACTIVE_LOW */
|
||||
#endif
|
||||
|
||||
}
|
||||
@@ -75,7 +80,11 @@ static int wireless_get(void)
|
||||
#endif
|
||||
|
||||
#ifdef WIRELESS_GPIO_WLAN_POWER
|
||||
#ifndef CONFIG_WLAN_POWER_ACTIVE_LOW
|
||||
if (gpio_get_level(WIRELESS_GPIO_WLAN_POWER))
|
||||
#else
|
||||
if (!gpio_get_level(WIRELESS_GPIO_WLAN_POWER))
|
||||
#endif /* CONFIG_WLAN_POWER_ACTIVE_LOW */
|
||||
flags |= EC_WIRELESS_SWITCH_WLAN_POWER;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -2128,6 +2128,9 @@
|
||||
*/
|
||||
#undef CONFIG_WIRELESS_SUSPEND
|
||||
|
||||
/* WiFi power control signal is active-low. */
|
||||
#undef CONFIG_WLAN_POWER_ACTIVE_LOW
|
||||
|
||||
/*
|
||||
* 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.
|
||||
|
||||
Reference in New Issue
Block a user