提交 5f56a8e6 编写于 作者: M Marek Szyprowski 提交者: Chris Ball

mmc: use regulator_can_change_voltage() instead of regulator_count_voltages

mmc_regulator_set_ocr() depends on the ability of regulator to change the
voltage value. When regulator cannot change its voltage output, some code
is skipped to avoid reporting false errors on some boards, which use MMC
hosts with fixed regulators (e.g. Samsung Goni and UniversalC210 boards).

This patch replaces a hacky workaround based on regulator_count_voltages()
value with the correct call to recently introduced
regulator_can_change_voltage() function in regulators core.
Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 bb691ae4
......@@ -1235,7 +1235,7 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc,
*/
voltage = regulator_get_voltage(supply);
if (regulator_count_voltages(supply) == 1)
if (!regulator_can_change_voltage(supply))
min_uV = max_uV = voltage;
if (voltage < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册