From: Uwe Kleine-König Date: Mon, 21 Mar 2016 21:10:26 +0000 (+0100) Subject: drm/omap: panel-dpi: make (limited) use of a reset gpio X-Git-Tag: v4.9.8~1605^2~39^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e2513b3f568332dcecd0bfe51a1f4b2abcc4ccee;p=platform%2Fkernel%2Flinux-rpi3.git drm/omap: panel-dpi: make (limited) use of a reset gpio 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 Signed-off-by: Uwe Kleine-König Signed-off-by: Tomi Valkeinen --- diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c index 7c2331b..9dc1c2f 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c @@ -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);