aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-09-23 09:12:11 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-05-07 04:31:23 -0400
commit818a053c54a3d98e4ec9b49ef9d123121e70e9eb (patch)
treeef331a3a73215b4b21e2cd0b5fa041344d7065bf /drivers/video
parent2c5c4075bcb998b54f51497b168ce0b280814e41 (diff)
OMAPDSS: HDMI4: set regulator voltage to 1.8V
Set the HDMI vdda 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/hdmi4.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/video/fbdev/omap2/dss/hdmi4.c b/drivers/video/fbdev/omap2/dss/hdmi4.c
index e15b89d49c28..5c7dd5c06593 100644
--- a/drivers/video/fbdev/omap2/dss/hdmi4.c
+++ b/drivers/video/fbdev/omap2/dss/hdmi4.c
@@ -83,6 +83,7 @@ static void hdmi_runtime_put(void)
83 83
84static int hdmi_init_regulator(void) 84static int hdmi_init_regulator(void)
85{ 85{
86 int r;
86 struct regulator *reg; 87 struct regulator *reg;
87 88
88 if (hdmi.vdda_hdmi_dac_reg != NULL) 89 if (hdmi.vdda_hdmi_dac_reg != NULL)
@@ -96,6 +97,15 @@ static int hdmi_init_regulator(void)
96 return PTR_ERR(reg); 97 return PTR_ERR(reg);
97 } 98 }
98 99
100 if (regulator_can_change_voltage(reg)) {
101 r = regulator_set_voltage(reg, 1800000, 1800000);
102 if (r) {
103 devm_regulator_put(reg);
104 DSSWARN("can't set the regulator voltage\n");
105 return r;
106 }
107 }
108
99 hdmi.vdda_hdmi_dac_reg = reg; 109 hdmi.vdda_hdmi_dac_reg = reg;
100 110
101 return 0; 111 return 0;