mmc: sdhci-msm: Fix SD card detection issue
The change in pull configs might not take into effect immediately and any value read before it is stabilized will mark incorrect card status. This causes SD card detection to fail when inserted for the first time. Fix this by adding enough delay after configuring the GPIO and before reading its value. Change-Id: I3a8455ce404988ab5eb3ed04c0f90ab6edf76d86 Signed-off-by: Sahitya Tummala <stummala@codeaurora.org> Signed-off-by: Pavan Anamula <pavana@codeaurora.org>
This commit is contained in:
parent
8984d4abf6
commit
ee08ef262b
1 changed files with 5 additions and 0 deletions
|
@ -3331,6 +3331,11 @@ static int sdhci_msm_probe(struct platform_device *pdev)
|
|||
*/
|
||||
sdhci_msm_setup_pins(msm_host->pdata, true);
|
||||
|
||||
/*
|
||||
* This delay is needed for stabilizing the card detect GPIO
|
||||
* line after changing the pull configs.
|
||||
*/
|
||||
usleep_range(10000, 10500);
|
||||
ret = mmc_gpio_request_cd(msm_host->mmc,
|
||||
msm_host->pdata->status_gpio, 0);
|
||||
if (ret) {
|
||||
|
|
Loading…
Add table
Reference in a new issue