From patchwork Sun Dec 20 11:13:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 7891681 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EA4B5BEEE5 for ; Sun, 20 Dec 2015 11:13:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2405420481 for ; Sun, 20 Dec 2015 11:13:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 498582047B for ; Sun, 20 Dec 2015 11:13:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754332AbbLTLNe (ORCPT ); Sun, 20 Dec 2015 06:13:34 -0500 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:47068 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754319AbbLTLNe (ORCPT ); Sun, 20 Dec 2015 06:13:34 -0500 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1aAbvY-0003y6-8W; Sun, 20 Dec 2015 12:13:24 +0100 Received: from ukl by dude.hi.pengutronix.de with local (Exim 4.86) (envelope-from ) id 1aAbvX-0002ki-ND; Sun, 20 Dec 2015 12:13:23 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Tomi Valkeinen , Jean-Christophe Plagniol-Villard Cc: linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH v2 2/3] fbdev: omap2: panel-dpi: make (limited) use of a reset gpio Date: Sun, 20 Dec 2015 12:13:21 +0100 Message-Id: <1450610002-10531-3-git-send-email-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1450610002-10531-1-git-send-email-u.kleine-koenig@pengutronix.de> References: <1450610002-10531-1-git-send-email-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-fbdev@vger.kernel.org Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Signed-off-by: Uwe Kleine-König --- Changes since (implicit) v1, sent with Message-Id: 1449753107-11410-4-git-send-email-uwe@kleine-koenig.org : - never assert reset because there are too many different panels with too many different needs for their reset. - split out dt binding changes - reword commit log --- drivers/video/fbdev/omap2/displays-new/panel-dpi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/video/fbdev/omap2/displays-new/panel-dpi.c b/drivers/video/fbdev/omap2/displays-new/panel-dpi.c index e780fd4f8b46..201a1c1a6f42 100644 --- a/drivers/video/fbdev/omap2/displays-new/panel-dpi.c +++ b/drivers/video/fbdev/omap2/displays-new/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);