mmc: sdhci-pci: Use device wakeup capability to determine MMC_PM_WAKE_SDIO_IRQ capability
PCI and ACPI determine if a device is wakeup capable, so use that to determine the MMC_PM_WAKE_SDIO_IRQ capability correctly. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
committed by
Ulf Hansson
parent
5c3c6126b6
commit
e92cc35d62
@@ -50,7 +50,7 @@ static int sdhci_pci_init_wakeup(struct sdhci_pci_chip *chip)
|
|||||||
pm_flags |= slot->host->mmc->pm_flags;
|
pm_flags |= slot->host->mmc->pm_flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
return device_init_wakeup(&chip->pdev->dev,
|
return device_set_wakeup_enable(&chip->pdev->dev,
|
||||||
(pm_flags & MMC_PM_KEEP_POWER) &&
|
(pm_flags & MMC_PM_KEEP_POWER) &&
|
||||||
(pm_flags & MMC_PM_WAKE_SDIO_IRQ));
|
(pm_flags & MMC_PM_WAKE_SDIO_IRQ));
|
||||||
}
|
}
|
||||||
@@ -1682,10 +1682,13 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
host->mmc->pm_caps = MMC_PM_KEEP_POWER | MMC_PM_WAKE_SDIO_IRQ;
|
host->mmc->pm_caps = MMC_PM_KEEP_POWER;
|
||||||
host->mmc->slotno = slotno;
|
host->mmc->slotno = slotno;
|
||||||
host->mmc->caps2 |= MMC_CAP2_NO_PRESCAN_POWERUP;
|
host->mmc->caps2 |= MMC_CAP2_NO_PRESCAN_POWERUP;
|
||||||
|
|
||||||
|
if (device_can_wakeup(&pdev->dev))
|
||||||
|
host->mmc->pm_caps |= MMC_PM_WAKE_SDIO_IRQ;
|
||||||
|
|
||||||
if (slot->cd_idx >= 0) {
|
if (slot->cd_idx >= 0) {
|
||||||
ret = mmc_gpiod_request_cd(host->mmc, NULL, slot->cd_idx,
|
ret = mmc_gpiod_request_cd(host->mmc, NULL, slot->cd_idx,
|
||||||
slot->cd_override_level, 0, NULL);
|
slot->cd_override_level, 0, NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user