From patchwork Tue Dec 10 10:56:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Enric Balletbo Serra X-Patchwork-Id: 3317241 Return-Path: X-Original-To: patchwork-linux-fbdev@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 657719F37C for ; Tue, 10 Dec 2013 10:56:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3AE9020174 for ; Tue, 10 Dec 2013 10:56:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DB8B52021C for ; Tue, 10 Dec 2013 10:56:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752453Ab3LJK4L (ORCPT ); Tue, 10 Dec 2013 05:56:11 -0500 Received: from mail-wg0-f54.google.com ([74.125.82.54]:33935 "EHLO mail-wg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752159Ab3LJK4G (ORCPT ); Tue, 10 Dec 2013 05:56:06 -0500 Received: by mail-wg0-f54.google.com with SMTP id n12so4680094wgh.33 for ; Tue, 10 Dec 2013 02:56:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=KVeG9Gnv+tr9//hLyM8aCTWVAY48XjWcpN0hzEhFDJw=; b=OwfZWit4m/3awKET0wnQ7srNFLo4C0XQHumPIpVJnjgh0EH2b9IQteLoBaY1UZB3mx vO1EGX2oLQOkUNyrmfHUhHQa3XH6ww0kx06gy2tqSn1vSteLUo+XIiRpKQPIOJZyM+wA tq3rsC5wh/Mbee9YfOybRcmzHBYVQ5RTCNPZtlV6UeO/tUCs7NWOfVVTSLRPD1K9FwOm FYfxQcI7WM9qHHZAdFzbPnND8qv8uTwtmywOUcTHRiIhLJnCBMSqQcWMbc+7TshFGnZF bTL+kcFCbU2ptJ00EXMHuJ8TENa4SV9tcgbrqJrkCNF9X+vtegfNhfjRsHmlitGaZvho J6/w== MIME-Version: 1.0 X-Received: by 10.180.188.197 with SMTP id gc5mr5197418wic.42.1386672962254; Tue, 10 Dec 2013 02:56:02 -0800 (PST) Received: by 10.194.78.130 with HTTP; Tue, 10 Dec 2013 02:56:02 -0800 (PST) In-Reply-To: References: <1386160133-24026-1-git-send-email-tomi.valkeinen@ti.com> <1386160133-24026-16-git-send-email-tomi.valkeinen@ti.com> <52A5BDF4.2070304@ti.com> <52A5E230.4010901@ti.com> Date: Tue, 10 Dec 2013 11:56:02 +0100 Message-ID: Subject: Re: [PATCH 15/26] ARM: omap4-panda.dts: add display information From: Enric Balletbo Serra To: Javier Martinez Canillas Cc: Tomi Valkeinen , "linux-omap@vger.kernel.org" , linux-fbdev@vger.kernel.org, "devicetree@vger.kernel.org" , Archit Taneja , Darren Etheridge , Tony Lindgren 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, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Hi all, 2013/12/9 Javier Martinez Canillas : > Hi Tomi, > > On Mon, Dec 9, 2013 at 4:30 PM, Tomi Valkeinen wrote: >> On 2013-12-09 17:09, Javier Martinez Canillas wrote: >>> Hi Tomi, >>> >>> On Mon, Dec 9, 2013 at 1:56 PM, Tomi Valkeinen wrote: >>>> On 2013-12-06 10:57, Javier Martinez Canillas wrote: >>>> >>>>>> + tfp410: encoder@0 { >>>>>> + compatible = "ti,tfp410"; >>>>>> + gpios = <&gpio1 0 0>; /* 0, power-down */ >>>>>> + >>>>> >>>>> Please use the constants from include/dt-bindings/ instead of magic >>>>> numbers, i.e: >>>>> >>>>> gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>; /* 0, power-down */ >>>> >>>> Thanks, fixed now (for all .dts files) >>>> >>>> However... The TFP410 gpio is "power-down". I think we should actually >>>> mark it as GPIO_ACTIVE_LOW, as setting it to 0 powers down the device. >>>> >>> >>> yes, I looked at the TFP410 datasheet [0] and the Power Down pin is >>> indeed an active-low, I just replaced to GPIO_ACTIVE_HIGH since you >>> were using a constant 0 and include/dt-bindings/gpio/gpio.h defines >>> GPIO_ACTIVE_HIGH as 0. >>> >>> I just asked to Enric why we use GPIO_ACTIVE_HIGH for the PD pin on >>> the IGEPv2 DTS instad and is because the IGEP board uses a hardware >>> signal inverter but that is a special case. I don't know about the >>> Panda board since I haven't looked at its datasheet. >> >> Oh. Does it work on igep? The TFP410 driver always handles the PD GPIO >> as it were active-low. The flag is ignored. >> > > How weird, it does work on the IGEPv2 but you are right I just looked > at at drivers/video/omap2/displays-new/encoder-tfp410.c and I see > that it indeed just does: > > r = devm_gpio_request_one(&pdev->dev, ddata->pd_gpio, > GPIOF_OUT_INIT_LOW, "tfp410 PD"); > > So I don't know how it is working... I'm on the road and won't have > access to my IGEPv2 to dig further on this. Maybe Enric can shed more > light on this. > On IGEPv2 the GPIO that controls the power-down pin is connected through a dual/buffer driver [1]. This driver is only a buffer, not inverts the signal (I had told you wrong, sorry Javier ), so the pin continues being active low. As both of you pointed the driver ignores the flag to handle the PD GPIO, so doesn't matter if in the device tree we put GPIO_ACTIVE_HIGH or GPIO_ACTIVE_LOW, so simply it works. About the patch to support display for IGEP, to be coherent, the gpio should be defined as GPIO_ACTIVE_LOW not GPIO_ACTIVE_HIGH. I have tested, and of course, works. [1] http://www.ti.com/product/sn74lvc2g07 Best regards, Enric >> Tomi >> >> > > Thanks a lot and best regards, > Javier --- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/boot/dts/omap3-igep0020.dts b/arch/arm/boot/dts/omap3-igep0020.dts index 2569d60..d185e06 100644 --- a/arch/arm/boot/dts/omap3-igep0020.dts +++ b/arch/arm/boot/dts/omap3-igep0020.dts @@ -233,7 +233,7 @@ tfp410: encoder@0 { compatible = "ti,tfp410"; - gpios = <&gpio6 10 GPIO_ACTIVE_HIGH>; /* 170, power-down */ + gpios = <&gpio6 10 GPIO_ACTIVE_LOW>; /* 170, power-down */ ports { #address-cells = <1>;