drm/omap: panel-dpi: make (limited) use of a reset gpio
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 21 Mar 2016 21:10:26 +0000 (22:10 +0100)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 6 Jun 2016 07:14:28 +0000 (10:14 +0300)
Some displays have a reset input. To assert that the display is
functional the reset gpio must be deasserted.

Teach the driver to get and drive such a gpio accordingly.

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/displays/panel-dpi.c

index 7c2331be8d15f8e1c7534181f76c3af0c2bcd8e3..9dc1c2f1fbc10cda88e2dc17d68c61334ef3df9c 100644 (file)
@@ -213,6 +213,16 @@ static int panel_dpi_probe_of(struct platform_device *pdev)
 
        ddata->enable_gpio = gpio;
 
+       /*
+        * Many different panels are supported by this driver and there are
+        * probably very different needs for their reset pins in regards to
+        * timing and order relative to the enable gpio. So for now it's just
+        * ensured that the reset line isn't active.
+        */
+       gpio = devm_gpiod_get_optional(&pdev->dev, "reset", GPIOD_OUT_LOW);
+       if (IS_ERR(gpio))
+               return PTR_ERR(gpio);
+
        ddata->backlight_gpio = -ENOENT;
 
        r = of_get_display_timing(node, "panel-timing", &timing);
This page took 0.026296 seconds and 5 git commands to generate.