Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02b7a320 authored by Tomi Valkeinen's avatar Tomi Valkeinen
Browse files

OMAPDSS: DSI: set regulator voltage to 1.8V



Set the DSI vdd regulator voltage to the required 1.8V.

This is required for the case when the regulator in the DT data defines
a range of allowed voltages. In this case it's required to set the
voltage, as otherwise enabling the voltage fails.

Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 818a053c
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1161,6 +1161,7 @@ static int dsi_regulator_init(struct platform_device *dsidev)
{
	struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
	struct regulator *vdds_dsi;
	int r;

	if (dsi->vdds_dsi_reg != NULL)
		return 0;
@@ -1173,6 +1174,15 @@ static int dsi_regulator_init(struct platform_device *dsidev)
		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;

	return 0;