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>2012-03-24 01:53:28 -0700
commit774c868ad0efc9997407be43b950fb396e51f8c8 (patch)
tree557456df0a069361a64a6ec24659537cbb37576a /arch/arm/mach-tegra/board-enterprise-sdhci.c
parent5dc96251c83bf25a046a596138578e2869e5e013 (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;