Commit ca6429d4 authored by Tim Kryger's avatar Tim Kryger Committed by Ulf Hansson

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: default avatarTim Kryger <tim.kryger@gmail.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 9cb15142
...@@ -1263,7 +1263,6 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc, ...@@ -1263,7 +1263,6 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc,
if (vdd_bit) { if (vdd_bit) {
int tmp; int tmp;
int voltage;
/* /*
* REVISIT mmc_vddrange_to_ocrmask() may have set some * REVISIT mmc_vddrange_to_ocrmask() may have set some
...@@ -1280,22 +1279,7 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc, ...@@ -1280,22 +1279,7 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc,
max_uV = min_uV + 100 * 1000; max_uV = min_uV + 100 * 1000;
} }
/*
* If we're using a fixed/static regulator, don't call
* regulator_set_voltage; it would fail.
*/
voltage = regulator_get_voltage(supply);
if (!regulator_can_change_voltage(supply))
min_uV = max_uV = voltage;
if (voltage < 0)
result = voltage;
else if (voltage < min_uV || voltage > max_uV)
result = regulator_set_voltage(supply, min_uV, max_uV); result = regulator_set_voltage(supply, min_uV, max_uV);
else
result = 0;
if (result == 0 && !mmc->regulator_enabled) { if (result == 0 && !mmc->regulator_enabled) {
result = regulator_enable(supply); result = regulator_enable(supply);
if (!result) if (!result)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment