Fixed regulators cannot change their voltage, so disable all voltage
range checking for them, otherwise the driver fails to operate with
fixed regulators. Up to now it worked only by luck, because
regulator_is_supported_voltage() function returned incorrect values.
Commit "regulator: fix voltage check in regulator_is_supported_voltage()"
fixed that function and now additional check is needed for fixed
regulators.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
regulator_enable(host->vmmc);
#ifdef CONFIG_REGULATOR
- if (host->vmmc) {
+ if (host->vmmc && regulator_count_voltages(host->vmmc) > 1) {
ret = regulator_is_supported_voltage(host->vmmc, 3300000,
3300000);
if ((ret <= 0) || (!(caps[0] & SDHCI_CAN_VDD_330)))