@@ -2944,6 +2944,9 @@ int sdhci_add_host(struct sdhci_host *host)
caps[1] &= ~(SDHCI_SUPPORT_SDR104 |
SDHCI_SUPPORT_SDR50 |
SDHCI_SUPPORT_DDR50);
+ if (host->nb_vqmmc)
+ regulator_register_notifier(host->vqmmc,
+ host->nb_vqmmc);
}
if (host->quirks2 & SDHCI_QUIRK2_NO_1_8_V)
@@ -3265,6 +3268,9 @@ void sdhci_remove_host(struct sdhci_host *host, int dead)
}
if (host->vqmmc) {
+ if (host->nb_vqmmc)
+ regulator_unregister_notifier(host->vqmmc,
+ host->nb_vqmmc);
regulator_disable(host->vqmmc);
regulator_put(host->vqmmc);
}
@@ -103,6 +103,7 @@ struct sdhci_host {
struct regulator *vmmc; /* Power regulator (vmmc) */
struct regulator *vqmmc; /* Signaling regulator (vccq) */
+ struct notifier_block *nb_vqmmc; /* Regulator notifier (vccq) */
/* Internal data */
struct mmc_host *mmc; /* MMC structure */