Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c809402b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mmc: sdhci-msm: Reenable cd gpio on system resume"

parents 67d79033 4073b350
Loading
Loading
Loading
Loading
+7 −9
Original line number Diff line number Diff line
@@ -3554,8 +3554,9 @@ static int sdhci_msm_suspend(struct device *dev)
	int ret = 0;
	ktime_t start = ktime_get();

	if (gpio_is_valid(msm_host->pdata->status_gpio))
		mmc_gpio_free_cd(msm_host->mmc);
	if (gpio_is_valid(msm_host->pdata->status_gpio) &&
		(msm_host->mmc->slot.cd_irq >= 0))
			disable_irq(msm_host->mmc->slot.cd_irq);

	if (pm_runtime_suspended(dev)) {
		pr_debug("%s: %s: already runtime suspended\n",
@@ -3577,13 +3578,10 @@ static int sdhci_msm_resume(struct device *dev)
	int ret = 0;
	ktime_t start = ktime_get();

	if (gpio_is_valid(msm_host->pdata->status_gpio)) {
		ret = mmc_gpio_request_cd(msm_host->mmc,
				msm_host->pdata->status_gpio, 0);
		if (ret)
			pr_err("%s: %s: Failed to request card detection IRQ %d\n",
					mmc_hostname(host->mmc), __func__, ret);
	}
	if (gpio_is_valid(msm_host->pdata->status_gpio) &&
		(msm_host->mmc->slot.cd_irq >= 0))
			enable_irq(msm_host->mmc->slot.cd_irq);

	if (pm_runtime_suspended(dev)) {
		pr_debug("%s: %s: runtime suspended, defer system resume\n",
		mmc_hostname(host->mmc), __func__);