diff options
author | Lee Jones <lee.jones@linaro.org> | 2013-01-31 06:27:52 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-03-01 17:25:25 -0500 |
commit | 237fb5e675a312a84a602ad0fbdf0b4957c71073 (patch) | |
tree | c8f8b75536801ef443b93d3a4c0e00706059ee9b /drivers/mmc/host/mmci.c | |
parent | b6c230196f07b9cdd23ceb899070076cdab0c467 (diff) |
mmc: mmci: Move ios_handler functionality into the driver
There are currently two instances of the ios_handler being used.
Both of which mearly toy with some regulator settings. Now there
is a GPIO regulator API, we can use that instead, and lessen the
per platform burden. By doing this, we also become more Device
Tree compatible.
Acked-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/mmc/host/mmci.c')
-rw-r--r-- | drivers/mmc/host/mmci.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 372e921389c8..375c109607ff 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
@@ -1141,6 +1141,11 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
1141 | case MMC_POWER_OFF: | 1141 | case MMC_POWER_OFF: |
1142 | if (!IS_ERR(mmc->supply.vmmc)) | 1142 | if (!IS_ERR(mmc->supply.vmmc)) |
1143 | mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0); | 1143 | mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0); |
1144 | |||
1145 | if (!IS_ERR(mmc->supply.vqmmc) && | ||
1146 | regulator_is_enabled(mmc->supply.vqmmc)) | ||
1147 | regulator_disable(mmc->supply.vqmmc); | ||
1148 | |||
1144 | break; | 1149 | break; |
1145 | case MMC_POWER_UP: | 1150 | case MMC_POWER_UP: |
1146 | if (!IS_ERR(mmc->supply.vmmc)) | 1151 | if (!IS_ERR(mmc->supply.vmmc)) |
@@ -1155,6 +1160,10 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
1155 | 1160 | ||
1156 | break; | 1161 | break; |
1157 | case MMC_POWER_ON: | 1162 | case MMC_POWER_ON: |
1163 | if (!IS_ERR(mmc->supply.vqmmc) && | ||
1164 | !regulator_is_enabled(mmc->supply.vqmmc)) | ||
1165 | regulator_enable(mmc->supply.vqmmc); | ||
1166 | |||
1158 | pwr |= MCI_PWR_ON; | 1167 | pwr |= MCI_PWR_ON; |
1159 | break; | 1168 | break; |
1160 | } | 1169 | } |