]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
OMAPDSS: HACK: look for regulators with omap4 names
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 5 Nov 2012 11:41:25 +0000 (13:41 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 7 Nov 2012 08:34:09 +0000 (10:34 +0200)
Normally the omapdss driver gets the regulators using the regulator
names assigned for omapdss. However, in an effort to get a minimal DSS
support for DT enabled kernel on selected boards, we will add omapdss
devices and platform data the old way even for DT kernel. This causes
the problem that omapdss cannot find the regulators using omapdss's
regulator names.

This patch creates a temporary workaround for DSI and HDMI by trying to
get the regulators also using native OMAP4 regulator names.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/omap2/dss/dsi.c
drivers/video/omap2/dss/hdmi.c

index d9797da39e69dae6313cdb81454c1274eff46ef7..cf32dc7e70f211369b5e8967e91cc44a0e01b46e 100644 (file)
@@ -1752,6 +1752,10 @@ int dsi_pll_init(struct platform_device *dsidev, bool enable_hsclk,
 
                vdds_dsi = regulator_get(&dsi->pdev->dev, "vdds_dsi");
 
+               /* DT HACK: try VCXIO to make omapdss work for o4 sdp/panda */
+               if (IS_ERR(vdds_dsi))
+                       vdds_dsi = regulator_get(&dsi->pdev->dev, "VCXIO");
+
                if (IS_ERR(vdds_dsi)) {
                        DSSERR("can't get VDDS_DSI regulator\n");
                        return PTR_ERR(vdds_dsi);
@@ -4968,6 +4972,10 @@ static int __init dsi_init_display(struct omap_dss_device *dssdev)
 
                vdds_dsi = regulator_get(&dsi->pdev->dev, "vdds_dsi");
 
+               /* DT HACK: try VCXIO to make omapdss work for o4 sdp/panda */
+               if (IS_ERR(vdds_dsi))
+                       vdds_dsi = regulator_get(&dsi->pdev->dev, "VCXIO");
+
                if (IS_ERR(vdds_dsi)) {
                        DSSERR("can't get VDDS_DSI regulator\n");
                        return PTR_ERR(vdds_dsi);
index 6cf2fe2ac23400dbb646f4612e614fdda1dbcfe1..49f104e7d1d09c46196e846e2e739d134f9db47a 100644 (file)
@@ -350,6 +350,10 @@ static int __init hdmi_init_display(struct omap_dss_device *dssdev)
 
                reg = devm_regulator_get(&hdmi.pdev->dev, "vdda_hdmi_dac");
 
+               /* DT HACK: try VDAC to make omapdss work for o4 sdp/panda */
+               if (IS_ERR(reg))
+                       reg = devm_regulator_get(&hdmi.pdev->dev, "VDAC");
+
                if (IS_ERR(reg)) {
                        DSSERR("can't get VDDA_HDMI_DAC regulator\n");
                        return PTR_ERR(reg);