[PATCH 5/6] staging: drm/imx: Add pinctrl support to parallel display driver

Sascha Hauer s.hauer at pengutronix.de
Mon Nov 12 07:29:03 PST 2012


To allow the iomux to be configured for the display.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/staging/imx-drm/parallel-display.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c
index 9b51d73..324283c 100644
--- a/drivers/staging/imx-drm/parallel-display.c
+++ b/drivers/staging/imx-drm/parallel-display.c
@@ -23,6 +23,7 @@
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_crtc_helper.h>
 #include <linux/videodev2.h>
+#include <linux/pinctrl/consumer.h>
 
 #include "imx-drm.h"
 
@@ -195,11 +196,20 @@ static int __devinit imx_pd_probe(struct platform_device *pdev)
 	struct imx_parallel_display *imxpd;
 	int ret;
 	const char *fmt;
+	struct pinctrl *pinctrl;
 
 	imxpd = devm_kzalloc(&pdev->dev, sizeof(*imxpd), GFP_KERNEL);
 	if (!imxpd)
 		return -ENOMEM;
 
+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+	if (IS_ERR(pinctrl)) {
+		ret = PTR_ERR(pinctrl);
+		dev_warn(&pdev->dev, "pinctrl_get_select_default failed with %d",
+				ret);
+		return ret;
+	}
+
 	edidp = of_get_property(np, "edid", &imxpd->edid_len);
 	if (edidp)
 		imxpd->edid = kmemdup(edidp, imxpd->edid_len, GFP_KERNEL);
-- 
1.7.10.4



More information about the dri-devel mailing list