aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2014-03-13 08:33:03 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-05-07 04:31:27 -0400
commit02b7a32083b9930543663720758de249b4f6a2a3 (patch)
tree5fc18842366eaf1a2f24970eea9937eb8be21122 /drivers/video
parent818a053c54a3d98e4ec9b49ef9d123121e70e9eb (diff)
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: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/omap2/dss/dsi.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/video/fbdev/omap2/dss/dsi.c b/drivers/video/fbdev/omap2/dss/dsi.c
index 8be9b04d8849..57f120896b43 100644
--- a/drivers/video/fbdev/omap2/dss/dsi.c
+++ b/drivers/video/fbdev/omap2/dss/dsi.c
@@ -1161,6 +1161,7 @@ static int dsi_regulator_init(struct platform_device *dsidev)
1161{ 1161{
1162 struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); 1162 struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
1163 struct regulator *vdds_dsi; 1163 struct regulator *vdds_dsi;
1164 int r;
1164 1165
1165 if (dsi->vdds_dsi_reg != NULL) 1166 if (dsi->vdds_dsi_reg != NULL)
1166 return 0; 1167 return 0;
@@ -1173,6 +1174,15 @@ static int dsi_regulator_init(struct platform_device *dsidev)
1173 return PTR_ERR(vdds_dsi); 1174 return PTR_ERR(vdds_dsi);
1174 } 1175 }
1175 1176
1177 if (regulator_can_change_voltage(vdds_dsi)) {
1178 r = regulator_set_voltage(vdds_dsi, 1800000, 1800000);
1179 if (r) {
1180 devm_regulator_put(vdds_dsi);
1181 DSSERR("can't set the DSI regulator voltage\n");
1182 return r;
1183 }
1184 }
1185
1176 dsi->vdds_dsi_reg = vdds_dsi; 1186 dsi->vdds_dsi_reg = vdds_dsi;
1177 1187
1178 return 0; 1188 return 0;