aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Kryger <tim.kryger@gmail.com>2014-08-12 01:05:12 -0400
committerUlf Hansson <ulf.hansson@linaro.org>2014-09-09 07:58:57 -0400
commitca6429d4952398570a3963bd4b5842b519087df8 (patch)
tree7cb69772298d0406edb31425c7ec9fba5becbe2d
parent9cb15142d0e336874ecc753e9a4e5696c46a67d9 (diff)
mmc: core: Remove fixed voltage regulator logic
There is no need for regulator consumers to include special logic for fixed voltage regulators as they support regulator_set_voltage() just like their non-fixed regulator counterparts. Signed-off-by: Tim Kryger <tim.kryger@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/core/core.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index d03a080fb9cd..2eb7c82ba4a2 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1263,7 +1263,6 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc,
1263 1263
1264 if (vdd_bit) { 1264 if (vdd_bit) {
1265 int tmp; 1265 int tmp;
1266 int voltage;
1267 1266
1268 /* 1267 /*
1269 * REVISIT mmc_vddrange_to_ocrmask() may have set some 1268 * REVISIT mmc_vddrange_to_ocrmask() may have set some
@@ -1280,22 +1279,7 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc,
1280 max_uV = min_uV + 100 * 1000; 1279 max_uV = min_uV + 100 * 1000;
1281 } 1280 }
1282 1281
1283 /* 1282 result = regulator_set_voltage(supply, min_uV, max_uV);
1284 * If we're using a fixed/static regulator, don't call
1285 * regulator_set_voltage; it would fail.
1286 */
1287 voltage = regulator_get_voltage(supply);
1288
1289 if (!regulator_can_change_voltage(supply))
1290 min_uV = max_uV = voltage;
1291
1292 if (voltage < 0)
1293 result = voltage;
1294 else if (voltage < min_uV || voltage > max_uV)
1295 result = regulator_set_voltage(supply, min_uV, max_uV);
1296 else
1297 result = 0;
1298
1299 if (result == 0 && !mmc->regulator_enabled) { 1283 if (result == 0 && !mmc->regulator_enabled) {
1300 result = regulator_enable(supply); 1284 result = regulator_enable(supply);
1301 if (!result) 1285 if (!result)