aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2014-01-02 05:54:31 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-03-19 05:03:06 -0400
commite6fa68ba82959bd2468271788d89e0fdb2f781e4 (patch)
tree0619504df7c461d5d1752e72aeb666662c86820d /drivers/video
parent4e7470ddca671aee2f5d11ba68573c94feddc5c2 (diff)
OMAPDSS: Improve regulator names for DT
The regulator names used for DSS components are somewhat ugly for DT use. As we're just adding DT support, it's simple to change the regulator names. This patch makes the DSS driver get the regulators with somewhat cleaner names when bootin with DT. For example, this allows us to define HDMI's VDDA regulator in the DT data as: vdda-supply = <...>; instead of vdda_hdmi_dac-supply = <...>; Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/dss/dsi.c5
-rw-r--r--drivers/video/omap2/dss/hdmi4.c5
-rw-r--r--drivers/video/omap2/dss/venc.c5
3 files changed, 12 insertions, 3 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index a820c37e323e..782e8989fcfb 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -1151,7 +1151,10 @@ static int dsi_regulator_init(struct platform_device *dsidev)
1151 if (dsi->vdds_dsi_reg != NULL) 1151 if (dsi->vdds_dsi_reg != NULL)
1152 return 0; 1152 return 0;
1153 1153
1154 vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdds_dsi"); 1154 if (dsi->pdev->dev.of_node)
1155 vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdd");
1156 else
1157 vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdds_dsi");
1155 1158
1156 /* DT HACK: try VCXIO to make omapdss work for o4 sdp/panda */ 1159 /* DT HACK: try VCXIO to make omapdss work for o4 sdp/panda */
1157 if (IS_ERR(vdds_dsi)) 1160 if (IS_ERR(vdds_dsi))
diff --git a/drivers/video/omap2/dss/hdmi4.c b/drivers/video/omap2/dss/hdmi4.c
index 4a74538f9ea5..ba6f02518ebe 100644
--- a/drivers/video/omap2/dss/hdmi4.c
+++ b/drivers/video/omap2/dss/hdmi4.c
@@ -88,7 +88,10 @@ static int hdmi_init_regulator(void)
88 if (hdmi.vdda_hdmi_dac_reg != NULL) 88 if (hdmi.vdda_hdmi_dac_reg != NULL)
89 return 0; 89 return 0;
90 90
91 reg = devm_regulator_get(&hdmi.pdev->dev, "vdda_hdmi_dac"); 91 if (hdmi.pdev->dev.of_node)
92 reg = devm_regulator_get(&hdmi.pdev->dev, "vdda");
93 else
94 reg = devm_regulator_get(&hdmi.pdev->dev, "vdda_hdmi_dac");
92 95
93 /* DT HACK: try VDAC to make omapdss work for o4 sdp/panda */ 96 /* DT HACK: try VDAC to make omapdss work for o4 sdp/panda */
94 if (IS_ERR(reg)) 97 if (IS_ERR(reg))
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index 2cd7f7e42105..7d40e52ad6d1 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -636,7 +636,10 @@ static int venc_init_regulator(void)
636 if (venc.vdda_dac_reg != NULL) 636 if (venc.vdda_dac_reg != NULL)
637 return 0; 637 return 0;
638 638
639 vdda_dac = devm_regulator_get(&venc.pdev->dev, "vdda_dac"); 639 if (venc.pdev->dev.of_node)
640 vdda_dac = devm_regulator_get(&venc.pdev->dev, "vdda");
641 else
642 vdda_dac = devm_regulator_get(&venc.pdev->dev, "vdda_dac");
640 643
641 if (IS_ERR(vdda_dac)) { 644 if (IS_ERR(vdda_dac)) {
642 if (PTR_ERR(vdda_dac) != -EPROBE_DEFER) 645 if (PTR_ERR(vdda_dac) != -EPROBE_DEFER)