>>diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c >>index 790f959..61fff10 100644 >>--- a/drivers/mmc/host/sdhci.c >>+++ b/drivers/mmc/host/sdhci.c >>@@ -1295,6 +1295,18 @@ static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) >> >> sdhci_set_clock(host, ios->clock); >> >>+ if (host->vsdio) { > > Why does this code need to be specific to sdio ? Should be generalized. sdio device, like bt/wlan have the requirement to dynamically control power. Also the runtime_pm introduced to mmc core by Ohad, is specifically for sdio. For mmc/sd, still not consider to dynamically control power, there already regulator vmmc to control power. The requirement for sdio device is more complicated, for example during suspend, sdio device may require continue power on. > >>+ if (ios->power_mode != host->power_mode_old) { >>+ if (ios->power_mode == MMC_POWER_OFF) >>+ regulator_disable(host->vsdio); >>+ >>+ if (ios->power_mode == MMC_POWER_UP) >>+ regulator_enable(host->vsdio); >>+ } >>+ >>+ host->power_mode_old = ios->power_mode; > > move up inside if since if not change no need to set. > > if the regulator is shared between different devices will this work ? What do you mean different devices. It is considered for different sdio client devices, not consider mmc/sd. > >>+ } >>+ >> if (ios->power_mode == MMC_POWER_OFF) >> sdhci_set_power(host, -1); >> else >>@@ -2751,6 +2763,13 @@ int sdhci_add_host(struct sdhci_host *host) >> regulator_enable(host->vmmc); >> } >> >>+ host->vsdio = regulator_get(mmc_dev(mmc), "vsdio"); > > comment on name -- should have nothing to do with sdio. > -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html