summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rtl8723as/os_dep/linux/custom_gpio_linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rtl8723as/os_dep/linux/custom_gpio_linux.c')
-rwxr-xr-xdrivers/net/wireless/rtl8723as/os_dep/linux/custom_gpio_linux.c33
1 files changed, 28 insertions, 5 deletions
diff --git a/drivers/net/wireless/rtl8723as/os_dep/linux/custom_gpio_linux.c b/drivers/net/wireless/rtl8723as/os_dep/linux/custom_gpio_linux.c
index 4604d006db93..eaf2e14e70c1 100755
--- a/drivers/net/wireless/rtl8723as/os_dep/linux/custom_gpio_linux.c
+++ b/drivers/net/wireless/rtl8723as/os_dep/linux/custom_gpio_linux.c
@@ -30,9 +30,30 @@
#if !(defined ANDROID_2X)
+#ifdef CONFIG_RTL8188E
+#include <mach/regulator.h>
+#include <linux/regulator/consumer.h>
+#endif // CONFIG_RTL8188E
+
+#ifndef GPIO_WIFI_POWER
+#define GPIO_WIFI_POWER -1
+#endif // !GPIO_WIFI_POWER
+
+#ifndef GPIO_WIFI_RESET
+#define GPIO_WIFI_RESET -1
+#endif // !GPIO_WIFI_RESET
+
+#ifndef GPIO_WIFI_PWDN
+#define GPIO_WIFI_PWDN -1
+#endif // !GPIO_WIFI_RESET
#ifdef CONFIG_GSPI_HCI
extern unsigned int oob_irq;
-#endif //CONFIG_GSPI_HCI
+#endif // CONFIG_GSPI_HCI
+
+#ifdef CONFIG_SDIO_HCI
+extern int rtw_mp_mode;
+#else // !CONFIG_SDIO_HCI
+#endif // !CONFIG_SDIO_HCI
int rtw_wifi_gpio_init(void)
{
@@ -70,15 +91,17 @@ void rtw_wifi_gpio_wlan_ctrl(int onoff)
{
switch (onoff) {
case WLAN_PWDN_OFF:
- DBG_8192C("%s: call customer specific GPIO to set wifi power down pin to 0\n",
- __FUNCTION__);
+ DBG_8192C("%s: call customer specific GPIO(%d) to set wifi power down pin to 0\n",
+ __FUNCTION__, GPIO_WIFI_RESET);
+
if (GPIO_WIFI_RESET > 0)
gpio_direction_output(GPIO_WIFI_RESET , 0);
break;
case WLAN_PWDN_ON:
- DBG_8192C("%s: callc customer specific GPIO to set wifi power down pin to 1\n",
- __FUNCTION__);
+ DBG_8192C("%s: callc customer specific GPIO(%d) to set wifi power down pin to 1\n",
+ __FUNCTION__, GPIO_WIFI_RESET);
+
if (GPIO_WIFI_RESET > 0)
gpio_direction_output(GPIO_WIFI_RESET , 1);
break;