mmc: sdhci-msm: Fix issue with SD card detect GPIO

Set up the card detect GPIO in active configuration before
configuring it as an IRQ. Otherwise, it can be in some
weird/inconsistent state resulting in flood of interrupts.

Change-Id: I8f2344a72acbd48df745cc9b2602fe4ac6f034d4
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
This commit is contained in:
Sahitya Tummala 2014-06-05 13:26:55 +05:30 committed by Subhash Jadavani
parent 28f9d7aa7b
commit 87baaf7467

View file

@ -2942,6 +2942,13 @@ static int sdhci_msm_probe(struct platform_device *pdev)
init_completion(&msm_host->pwr_irq_completion);
if (gpio_is_valid(msm_host->pdata->status_gpio)) {
/*
* Set up the card detect GPIO in active configuration before
* configuring it as an IRQ. Otherwise, it can be in some
* weird/inconsistent state resulting in flood of interrupts.
*/
sdhci_msm_setup_pins(msm_host->pdata, true);
ret = mmc_gpio_request_cd(msm_host->mmc,
msm_host->pdata->status_gpio, 0);
if (ret) {