Some soc/platform need specific handling for signal voltage switch. For example, mmp2/mmp3 need to set the AIB IO domain control register accordingly. Use regulator notifier to do this. Signed-off-by: Philip Rakity <prakity@xxxxxxxxxxx> Signed-off-by: Kevin Liu <kliu5@xxxxxxxxxxx> --- drivers/mmc/host/sdhci.c | 6 ++++++ include/linux/mmc/sdhci.h | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 81a4bfa..107ac15 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -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); } diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index b838ffc..c3ef3b6 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h @@ -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 */ -- 1.7.9.5 -- 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