summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/sdi.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-03-19 13:46:40 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-06-17 14:00:47 +0300
commit46c4b64516d54d149a3050c29e3ca06842f609b3 (patch)
tree43257752f3322dc17d77985a1bd964792e61d085 /drivers/video/omap2/dss/sdi.c
parentd37801b3a23c8aeeb9ab803a1b2177a8f51967d2 (diff)
downloadop-kernel-dev-46c4b64516d54d149a3050c29e3ca06842f609b3.zip
op-kernel-dev-46c4b64516d54d149a3050c29e3ca06842f609b3.tar.gz
OMAPDSS: SDI: fix regulators for DT
SDI requires a regulator to operate. This regulator is, for some reason, currently attached to the virtual omapdss device, instead of the SDI 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 SDI 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 SDI. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/sdi.c')
-rw-r--r--drivers/video/omap2/dss/sdi.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
index d362fe1..89e53eb 100644
--- a/drivers/video/omap2/dss/sdi.c
+++ b/drivers/video/omap2/dss/sdi.c
@@ -31,6 +31,8 @@
#include "dss.h"
static struct {
+ struct platform_device *pdev;
+
bool update_enabled;
struct regulator *vdds_sdi_reg;
@@ -258,8 +260,11 @@ static int sdi_init_regulator(void)
vdds_sdi = dss_get_vdds_sdi();
if (IS_ERR(vdds_sdi)) {
- DSSERR("can't get VDDS_SDI regulator\n");
- return PTR_ERR(vdds_sdi);
+ vdds_sdi = devm_regulator_get(&sdi.pdev->dev, "vdds_sdi");
+ if (IS_ERR(vdds_sdi)) {
+ DSSERR("can't get VDDS_SDI regulator\n");
+ return PTR_ERR(vdds_sdi);
+ }
}
sdi.vdds_sdi_reg = vdds_sdi;
@@ -362,6 +367,8 @@ static int omap_sdi_probe(struct platform_device *pdev)
{
int r;
+ sdi.pdev = pdev;
+
sdi_init_output(pdev);
if (pdev->dev.platform_data) {
OpenPOWER on IntegriCloud