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

Commit 83b8e7f5 authored by Can Guo's avatar Can Guo
Browse files

mmc: sdhci-msm: Do not disable card detect IRQ on system suspend



In 3.18 kernel mmc_gpiod_request_cd_irq() is not called as part of
call to mmc_gpio_request_cd(). During probe this is taken care of
by calling mmc_gpiod_request_cd_irq() from mmc_start_host(), but if
mmc_gpio_request_cd() followed by a mmc_gpio_free_cd() is invoked
after mmc_start_host() (such as in system suspend/resume path) then
mmc_gpiod_request_cd_irq() needs to be called explicitly.
So, in msm-3.18, change 4073b350d
('mmc: sdhci-msm: Reenable cd gpio on system resume') disable/enable
the irq in system suspend/resume path. This change has been kept since
then. However, since mmc_gpio_free_cd() is obsoleted from 4.4 kernel,
this change is not needed anymore. So, remove the codes introduced from
this change.

Change-Id: I113cbae8494626c7385113017b11a2fdf6de0f98
Signed-off-by: default avatarCan Guo <cang@codeaurora.org>
parent 01dafb76
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -5704,16 +5704,10 @@ static int sdhci_msm_runtime_resume(struct device *dev)
static int sdhci_msm_suspend(struct device *dev)
{
	struct sdhci_host *host = dev_get_drvdata(dev);
	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
	struct sdhci_msm_host *msm_host = pltfm_host->priv;
	int ret = 0;
	int sdio_cfg = 0;
	ktime_t start = ktime_get();

	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",
		mmc_hostname(host->mmc), __func__);
@@ -5736,16 +5730,10 @@ static int sdhci_msm_suspend(struct device *dev)
static int sdhci_msm_resume(struct device *dev)
{
	struct sdhci_host *host = dev_get_drvdata(dev);
	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
	struct sdhci_msm_host *msm_host = pltfm_host->priv;
	int ret = 0;
	int sdio_cfg = 0;
	ktime_t start = ktime_get();

	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__);