From 818a053c54a3d98e4ec9b49ef9d123121e70e9eb Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Mon, 23 Sep 2013 18:42:11 +0530 Subject: 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 --- drivers/video/fbdev/omap2/dss/hdmi4.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/video/fbdev/omap2/dss/hdmi4.c') diff --git a/drivers/video/fbdev/omap2/dss/hdmi4.c b/drivers/video/fbdev/omap2/dss/hdmi4.c index e15b89d..5c7dd5c 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) static int hdmi_init_regulator(void) { + int r; struct regulator *reg; if (hdmi.vdda_hdmi_dac_reg != NULL) @@ -96,6 +97,15 @@ static int hdmi_init_regulator(void) 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_hdmi_dac_reg = reg; return 0; -- cgit v1.1