summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRahul Bansal <rbansal@nvidia.com>2010-12-13 16:18:12 +0530
committerBharat Nihalani <bnihalani@nvidia.com>2010-12-28 23:59:15 -0800
commit3dba2bed8216623e281409788de8c7c322959421 (patch)
treed4246a27390bd860cbdb0d94fdeef26db3d6e2f5
parentf52b89b7405466ddefb65fa9337f535612e8281b (diff)
[arm/tegra] Support for Wake-On-Wireless Event.tegra-10.11.1.1tegra-10.11.1
Support for device wakeup on receiving in-band SDIO-WIFI interrupt for incoming wifi pakcket. Bug: 767438 Change-Id: Ibc1f95cc38eacef84e528e1beca6a4fdbdc36338 Reviewed-on: http://git-master/r/12702 Reviewed-by: Rahul Bansal <rbansal@nvidia.com> Tested-by: Rahul Bansal <rbansal@nvidia.com> Reviewed-by: Rakesh Kumar <krakesh@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
-rwxr-xr-x[-rw-r--r--]arch/arm/mach-tegra/board-ventana-power.c4
-rwxr-xr-x[-rw-r--r--]arch/arm/mach-tegra/board-ventana-sdhci.c4
-rwxr-xr-x[-rw-r--r--]drivers/mmc/host/sdhci-tegra.c8
3 files changed, 14 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/board-ventana-power.c b/arch/arm/mach-tegra/board-ventana-power.c
index d56ac998a385..e90775410b3c 100644..100755
--- a/arch/arm/mach-tegra/board-ventana-power.c
+++ b/arch/arm/mach-tegra/board-ventana-power.c
@@ -183,9 +183,9 @@ static struct tegra_suspend_platform_data ventana_suspend_data = {
.separate_req = true,
.corereq_high = false,
.sysclkreq_high = true,
- .wake_enb = TEGRA_WAKE_GPIO_PV2 | TEGRA_WAKE_GPIO_PC7,
+ .wake_enb = TEGRA_WAKE_GPIO_PV2 | TEGRA_WAKE_GPIO_PC7 | TEGRA_WAKE_GPIO_PY6,
.wake_high = 0,
- .wake_low = TEGRA_WAKE_GPIO_PV2,
+ .wake_low = TEGRA_WAKE_GPIO_PV2 | TEGRA_WAKE_GPIO_PY6,
.wake_any = TEGRA_WAKE_GPIO_PC7,
};
diff --git a/arch/arm/mach-tegra/board-ventana-sdhci.c b/arch/arm/mach-tegra/board-ventana-sdhci.c
index 7dc76f6111cc..9eb7a71306e1 100644..100755
--- a/arch/arm/mach-tegra/board-ventana-sdhci.c
+++ b/arch/arm/mach-tegra/board-ventana-sdhci.c
@@ -226,6 +226,10 @@ static int __init ventana_wifi_init(void)
gpio_direction_output(VENTANA_WLAN_RST, 0);
platform_device_register(&ventana_wifi_device);
+
+ device_init_wakeup(&ventana_wifi_device.dev, 1);
+ device_set_wakeup_enable(&ventana_wifi_device.dev, 0);
+
return 0;
}
int __init ventana_sdhci_init(void)
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index b6308d5a9572..a16aa2b53417 100644..100755
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -283,6 +283,10 @@ static int tegra_sdhci_suspend(struct platform_device *pdev, pm_message_t state)
u16 clk;
unsigned int clock = 100000;
+ if (device_may_wakeup(&pdev->dev)) {
+ enable_irq_wake(host->sdhci->irq);
+ }
+
/* save interrupt status before suspending */
host->sdhci_ints = sdhci_readl(host->sdhci, SDHCI_INT_ENABLE);
@@ -320,6 +324,10 @@ static int tegra_sdhci_resume(struct platform_device *pdev)
if (host->card_always_on && is_card_sdio(host->sdhci->mmc->card)) {
int ret = 0;
+ if (device_may_wakeup(&pdev->dev)) {
+ disable_irq_wake(host->sdhci->irq);
+ }
+
/* soft reset SD host controller and enable interrupts */
ret = tegra_sdhci_restore(host->sdhci);
if (ret) {