summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dpi.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-03-19 11:33:52 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-06-17 14:00:45 +0300
commit00df43b8227dbb0100625b279ccbd66d4a03110c (patch)
treeb122859359616558abc16199d2873d45828c9341 /drivers/video/omap2/dss/dpi.c
parent2795f646a798767523a91c2b147c9774d0c3070f (diff)
downloadblackbird-op-linux-00df43b8227dbb0100625b279ccbd66d4a03110c.tar.gz
blackbird-op-linux-00df43b8227dbb0100625b279ccbd66d4a03110c.zip
OMAPDSS: DPI: fix regulators for DT
On some platforms DPI requires a regulator to be enabled to power up the output pins. This regulator is, for some reason, currently attached to the virtual omapdss device, instead of the DPI device. This does not work for DT, as the regulator mappings need to be described in the DT data, and the virtual omapdss device is not present there. Fix the issue by acquiring the regulator in the DPI device. To retain compatibility with the current board files, the old method of getting the regulator is kept. The old method can be removed when the board files have been changed to pass the regulator to DPI. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/dpi.c')
-rw-r--r--drivers/video/omap2/dss/dpi.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index 0aa396b36e7e..aa653c46d9a4 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -37,6 +37,8 @@
#include "dss_features.h"
static struct {
+ struct platform_device *pdev;
+
struct regulator *vdds_dsi_reg;
struct platform_device *dsidev;
@@ -555,8 +557,11 @@ static int dpi_init_regulator(void)
vdds_dsi = dss_get_vdds_dsi();
if (IS_ERR(vdds_dsi)) {
- DSSERR("can't get VDDS_DSI regulator\n");
- return PTR_ERR(vdds_dsi);
+ vdds_dsi = devm_regulator_get(&dpi.pdev->dev, "vdds_dsi");
+ if (IS_ERR(vdds_dsi)) {
+ DSSERR("can't get VDDS_DSI regulator\n");
+ return PTR_ERR(vdds_dsi);
+ }
}
dpi.vdds_dsi_reg = vdds_dsi;
@@ -707,6 +712,8 @@ static int omap_dpi_probe(struct platform_device *pdev)
{
int r;
+ dpi.pdev = pdev;
+
mutex_init(&dpi.lock);
dpi_init_output(pdev);
OpenPOWER on IntegriCloud