Skip to content

Commit

Permalink
mmc: sdhci-acpi: enable runtime-pm for device HID INT33C6
Browse files Browse the repository at this point in the history
sdhci-acpi supports ACPI devices which have compatibility ID
PNP0D40, however it is not possible to know if those devices
will all work correctly with runtime-pm, so that must be configured
per hardware ID.

For INT33C6, several related quirks, capabilities and flags are set:

	MMC_CAP_NONREMOVABLE
		The SDIO card will never be removable

	SDHCI_ACPI_RUNTIME_PM
		Enable runtime-pm of the host controller

	MMC_CAP_POWER_OFF_CARD
		Enable runtime-pm of the SDIO card

	MMC_PM_KEEP_POWER
		SDIO card has the capability to remain powered up
		during system suspend

	SDHCI_QUIRK2_HOST_OFF_CARD_ON
		Always do a full reset during system resume
		because the card may be already initialized having
		not been powered off.

Wake-ups from the INT33C6 host controller are not supported, so the
following capability must *not* be set:

	MMC_PM_WAKE_SDIO_IRQ
		Enable wake on card interrupt

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Adrian Hunter authored and Rafael J. Wysocki committed Dec 10, 2012
1 parent 5e7779f commit e557139
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/mmc/host/sdhci-acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,15 @@ static const struct sdhci_ops sdhci_acpi_ops_dflt = {
.enable_dma = sdhci_acpi_enable_dma,
};

static const struct sdhci_acpi_slot sdhci_acpi_slot_int_sdio = {
.quirks2 = SDHCI_QUIRK2_HOST_OFF_CARD_ON,
.caps = MMC_CAP_NONREMOVABLE | MMC_CAP_POWER_OFF_CARD,
.flags = SDHCI_ACPI_RUNTIME_PM,
.pm_caps = MMC_PM_KEEP_POWER,
};

static const struct acpi_device_id sdhci_acpi_ids[] = {
{ "INT33C6", (kernel_ulong_t)&sdhci_acpi_slot_int_sdio },
{ "PNP0D40" },
{ },
};
Expand Down

0 comments on commit e557139

Please sign in to comment.