@@ -634,6 +634,7 @@ static int byt_sd_probe_slot(struct sdhci_pci_slot *slot)
MMC_CAP_AGGRESSIVE_PM;
slot->cd_idx = 0;
slot->cd_override_level = true;
+ slot->cd_wake = true;
if (slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_BXT_SD ||
slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_BXTM_SD ||
slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_APL_SD ||
@@ -1989,6 +1990,8 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot(
if (ret) {
dev_warn(&pdev->dev, "failed to setup card detect gpio\n");
slot->cd_idx = -1;
+ } else if (slot->cd_wake) {
+ mmc_gpio_cd_enable_wake(host->mmc);
}
}
@@ -91,6 +91,7 @@ struct sdhci_pci_slot {
int cd_idx;
bool cd_override_level;
+ bool cd_wake;
void (*hw_reset)(struct sdhci_host *host);
unsigned long private[0] ____cacheline_aligned;
Enable card detect wake for Intel BYT-related SD card host controllers. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> --- drivers/mmc/host/sdhci-pci-core.c | 3 +++ drivers/mmc/host/sdhci-pci.h | 1 + 2 files changed, 4 insertions(+)