aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/omap2/dss/dsi.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2014-03-13 14:33:03 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-05-07 11:31:27 +0300
commit02b7a32083b9930543663720758de249b4f6a2a3 (patch)
tree5fc18842366eaf1a2f24970eea9937eb8be21122 /drivers/video/fbdev/omap2/dss/dsi.c
parentOMAPDSS: HDMI4: set regulator voltage to 1.8V (diff)
downloadlinux-dev-02b7a32083b9930543663720758de249b4f6a2a3.tar.xz
linux-dev-02b7a32083b9930543663720758de249b4f6a2a3.zip
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/fbdev/omap2/dss/dsi.c')
-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)
{
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;