summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-enterprise-sdhci.c
diff options
context:
space:
mode:
authorRakesh Goyal <rgoyal@nvidia.com>2011-11-03 20:39:55 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:52:37 -0800
commit41feb6f3c40efdfd857588bc978ae5710015f943 (patch)
tree399402e4328abea9bfd4b934d4c1dd80bdbe078d /arch/arm/mach-tegra/board-enterprise-sdhci.c
parent9c4d16416d803356ab66c54822cfa9d1ccf5c853 (diff)
arm: tegra: enterprise: wifi out-band-interrupt
1) configuring wf_wakeup gpio 2) create resource wifi_resource and provide it to wifi driver Bug 820860 Change-Id: I640b5abafd1df8d93ed480dd1661eef83d3d1677 Reviewed-on: http://git-master/r/62168 Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com> Tested-by: Rakesh Goyal <rgoyal@nvidia.com> Reviewed-by: Narayan Reddy <narayanr@nvidia.com> Tested-by: Narayan Reddy <narayanr@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Rebase-Id: R8c2155dbfa419b33d364051bb7edd90d1df7a5be
Diffstat (limited to 'arch/arm/mach-tegra/board-enterprise-sdhci.c')
-rw-r--r--arch/arm/mach-tegra/board-enterprise-sdhci.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-enterprise-sdhci.c b/arch/arm/mach-tegra/board-enterprise-sdhci.c
index 65b99ce7766c..9692c34dff40 100644
--- a/arch/arm/mach-tegra/board-enterprise-sdhci.c
+++ b/arch/arm/mach-tegra/board-enterprise-sdhci.c
@@ -34,6 +34,7 @@
#define ENTERPRISE_WLAN_PWR TEGRA_GPIO_PV2
#define ENTERPRISE_WLAN_RST TEGRA_GPIO_PV3
+#define ENTERPRISE_WLAN_WOW TEGRA_GPIO_PU6
#define ENTERPRISE_SD_CD TEGRA_GPIO_PI5
static void (*wifi_status_cb)(int card_present, void *dev_id);
@@ -50,9 +51,20 @@ static struct wifi_platform_data enterprise_wifi_control = {
.set_carddetect = enterprise_wifi_set_carddetect,
};
+static struct resource wifi_resource[] = {
+ [0] = {
+ .name = "bcm4329_wlan_irq",
+ .start = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PU6),
+ .end = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PU6),
+ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL | IORESOURCE_IRQ_SHAREABLE,
+ },
+};
+
static struct platform_device enterprise_wifi_device = {
.name = "bcm4329_wlan",
.id = 1,
+ .num_resources = 1,
+ .resource = wifi_resource,
.dev = {
.platform_data = &enterprise_wifi_control,
},
@@ -217,9 +229,13 @@ static int __init enterprise_wifi_init(void)
rc = gpio_request(ENTERPRISE_WLAN_RST, "wlan_rst");
if (rc)
pr_err("WLAN_RST gpio request failed:%d\n", rc);
+ rc = gpio_request(ENTERPRISE_WLAN_WOW, "bcmsdh_sdmmc");
+ if (rc)
+ pr_err("WLAN_WOW gpio request failed:%d\n", rc);
tegra_gpio_enable(ENTERPRISE_WLAN_PWR);
tegra_gpio_enable(ENTERPRISE_WLAN_RST);
+ tegra_gpio_enable(ENTERPRISE_WLAN_WOW);
rc = gpio_direction_output(ENTERPRISE_WLAN_PWR, 0);
if (rc)
@@ -227,6 +243,9 @@ static int __init enterprise_wifi_init(void)
gpio_direction_output(ENTERPRISE_WLAN_RST, 0);
if (rc)
pr_err("WLAN_RST gpio direction configuration failed:%d\n", rc);
+ rc = gpio_direction_input(ENTERPRISE_WLAN_WOW);
+ if (rc)
+ pr_err("WLAN_WOW gpio direction configuration failed:%d\n", rc);
platform_device_register(&enterprise_wifi_device);
return 0;