diff options
author | Pavan Kunapuli <pkunapuli@nvidia.com> | 2010-10-25 14:22:45 +0530 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2010-10-25 17:59:31 -0700 |
commit | dc9cea61b3333432d6c1d2003a1bdb9ce055f04a (patch) | |
tree | f82993cf9d1968e12c9b24ff2258138d3e74d4c1 | |
parent | 17d2d531f3f0b8f0b2dc24fba3ccd02e9dcf7210 (diff) |
sdhci-tegra:Detect SD cards inserted during suspend.
Update card_present variable during resume by reading
card detect gpio value inorder to detect cards inserted
during suspend.
Change-Id: Ie3eb7cb09cf84fa0795a21c44b28e07e6302adb7
Reviewed-on: http://git-master/r/8060
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
-rwxr-xr-x | drivers/mmc/host/sdhci-tegra.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index 2506db6c5329..7d4006084eb1 100755 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -510,6 +510,10 @@ static int tegra_sdhci_resume(struct device *dev) host->clk_enable = true; } + if (host->gpio_cd != -1) + host->card_present = + (gpio_get_value(host->gpio_cd) == host->gpio_polarity_cd); + if (host->card_always_on && is_card_sdio(sdhost->mmc->card)) { int ret = 0; |