From patchwork Thu Apr 24 09:52:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 4047241 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9DDFB9F1F4 for ; Thu, 24 Apr 2014 09:53:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CA7E0201F7 for ; Thu, 24 Apr 2014 09:53:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C2040201BB for ; Thu, 24 Apr 2014 09:53:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754573AbaDXJxi (ORCPT ); Thu, 24 Apr 2014 05:53:38 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:57838 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752719AbaDXJxe (ORCPT ); Thu, 24 Apr 2014 05:53:34 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s3O9qmok021260; Thu, 24 Apr 2014 04:52:48 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s3O9qmPO002894; Thu, 24 Apr 2014 04:52:48 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Thu, 24 Apr 2014 04:52:47 -0500 Received: from [192.168.2.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s3O9qgWE011139; Thu, 24 Apr 2014 04:52:43 -0500 Message-ID: <5358DEEA.1000506@ti.com> Date: Thu, 24 Apr 2014 12:52:42 +0300 From: Tomi Valkeinen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Tony Lindgren , Joachim Eastwood CC: , , , , Archit Taneja , Darren Etheridge , Laurent Pinchart , Stefan Roese , Sebastian Reichel , Robert Nelson , "Dr . H . Nikolaus Schaller" , Marek Belisko , Sebastian Reichel , Javier Martinez Canillas , Enric Balletbo Serra , Florian Vaussard Subject: Re: [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support References: <1390301833-24944-1-git-send-email-tomi.valkeinen@ti.com> <1390301833-24944-20-git-send-email-tomi.valkeinen@ti.com> <20140418155107.GB5354@atomide.com> In-Reply-To: <20140418155107.GB5354@atomide.com> X-Enigmail-Version: 1.6 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=unavailable 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 On 18/04/14 18:51, Tony Lindgren wrote: >> + gpio = of_get_gpio(node, 0); >> + if (gpio_is_valid(gpio) || gpio == -ENOENT) { >> + ddata->enable_gpio = gpio; >> + } else { >> + dev_err(&pdev->dev, "failed to parse enable gpio\n"); >> + return gpio; >> + } > > We should set the GPIO polarity based on the OF_GPIO_ACTIVE_LOW like > gpio_backlight_probe_dt is doing. Instead of doing it with the old gpio API, and checking the 'active' flag everywhere, I think we can use the new gpiod API which handles the polarity automatically. I attached prototype patches (based on -rc2) for panel dpi using that approach. It's a bit messier than I'd like, because for non-DT boot we need to request the gpio using the old API, and then convert it to gpio_desc. We can remove that code when all the boards use DT. I've compiled tested this only, as I don't have DPI panels I could use. I did try similar approach for TFP410, and it seemed to work fine. Tomi From fe2a85da34499fab70212c4cc5870378678da709 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 16 May 2013 15:14:16 +0300 Subject: [PATCH 2/3] OMAPDSS: panel-dpi: Add DT support Add DT support for panel-dpi. Signed-off-by: Tomi Valkeinen Reviewed-by: Archit Taneja --- drivers/video/fbdev/omap2/displays-new/panel-dpi.c | 59 +++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/omap2/displays-new/panel-dpi.c b/drivers/video/fbdev/omap2/displays-new/panel-dpi.c index d379dec3bd4a..dca6b10d1157 100644 --- a/drivers/video/fbdev/omap2/displays-new/panel-dpi.c +++ b/drivers/video/fbdev/omap2/displays-new/panel-dpi.c @@ -13,9 +13,12 @@ #include #include #include +#include +#include #include