diff mbox

[4/5] OMAPDSS: SDI: Use V28 as regulator for N900

Message ID 1385240244-28629-5-git-send-email-sre@debian.org (mailing list archive)
State New, archived
Headers show

Commit Message

Sebastian Reichel Nov. 23, 2013, 8:57 p.m. UTC
This adds a Nokia N900 quirk, so that the V28
regulator is used for the omapdss.sdi port.

This quirk is needed until omapdss is converted
to DT, so that the regulator can be acquired via
a phandle.

On other boards the regulator can be renamed in
the DT data, but on the Nokia N900 the regulator
is also used for other hardware components.

Signed-off-by: Sebastian Reichel <sre@debian.org>
---
 drivers/video/omap2/dss/sdi.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
index ccc569a..ca8f102 100644
--- a/drivers/video/omap2/dss/sdi.c
+++ b/drivers/video/omap2/dss/sdi.c
@@ -26,6 +26,7 @@ 
 #include <linux/export.h>
 #include <linux/platform_device.h>
 #include <linux/string.h>
+#include <linux/of.h>
 
 #include <video/omapdss.h>
 #include "dss.h"
@@ -263,7 +264,12 @@  static int sdi_init_regulator(void)
 	if (sdi.vdds_sdi_reg)
 		return 0;
 
-	vdds_sdi = devm_regulator_get(&sdi.pdev->dev, "vdds_sdi");
+	/* TODO: remove this hack, once we acquire regulator via DT phandle */
+	if (of_machine_is_compatible("nokia,omap3-n900"))
+		vdds_sdi = devm_regulator_get(&sdi.pdev->dev, "V28");
+	else
+		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);