drm/omap: Remove regulator API abuse

regulator_can_change_voltage() is deprecated and it's use is not necessary
as commit:
6a0028b3dd regulator: Deprecate regulator_can_change_voltage()
describers it clearly.

Also, regulator_set_voltage() is misused in the driver, as it is
supposed to be used only in cases where the regulator voltage needs to
be changed dynamically at runtime. In DSS's case, we always want a fixed
voltage, set in the .dts files.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
Peter Ujfalusi 2016-04-28 15:42:18 +03:00 коммит произвёл Tomi Valkeinen
Родитель 4bafcbc77f
Коммит 973999aa01
3 изменённых файлов: 0 добавлений и 27 удалений

Просмотреть файл

@ -1180,15 +1180,6 @@ static int dsi_regulator_init(struct platform_device *dsidev)
return PTR_ERR(vdds_dsi); return PTR_ERR(vdds_dsi);
} }
if (regulator_can_change_voltage(vdds_dsi)) {
r = regulator_set_voltage(vdds_dsi, 1800000, 1800000);
if (r) {
devm_regulator_put(vdds_dsi);
DSSERR("can't set the DSI regulator voltage\n");
return r;
}
}
dsi->vdds_dsi_reg = vdds_dsi; dsi->vdds_dsi_reg = vdds_dsi;
return 0; return 0;

Просмотреть файл

@ -115,15 +115,6 @@ static int hdmi_init_regulator(void)
return PTR_ERR(reg); return PTR_ERR(reg);
} }
if (regulator_can_change_voltage(reg)) {
r = regulator_set_voltage(reg, 1800000, 1800000);
if (r) {
devm_regulator_put(reg);
DSSWARN("can't set the regulator voltage\n");
return r;
}
}
hdmi.vdda_reg = reg; hdmi.vdda_reg = reg;
return 0; return 0;

Просмотреть файл

@ -132,15 +132,6 @@ static int hdmi_init_regulator(void)
return PTR_ERR(reg); return PTR_ERR(reg);
} }
if (regulator_can_change_voltage(reg)) {
r = regulator_set_voltage(reg, 1800000, 1800000);
if (r) {
devm_regulator_put(reg);
DSSWARN("can't set the regulator voltage\n");
return r;
}
}
hdmi.vdda_reg = reg; hdmi.vdda_reg = reg;
return 0; return 0;