From patchwork Fri Feb 28 13:51:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 3741551 Return-Path: X-Original-To: patchwork-davinci@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 1D8E19F2ED for ; Fri, 28 Feb 2014 13:53:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2B24F202B4 for ; Fri, 28 Feb 2014 13:53:49 +0000 (UTC) Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1407520225 for ; Fri, 28 Feb 2014 13:53:48 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s1SDqE88031864; Fri, 28 Feb 2014 07:52:15 -0600 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1SDqDRd015228; Fri, 28 Feb 2014 07:52:13 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Fri, 28 Feb 2014 07:52:13 -0600 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1SDqC0k019983; Fri, 28 Feb 2014 07:52:12 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 2973380627; Fri, 28 Feb 2014 07:52:12 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflxv17.itg.ti.com (dflxv17.itg.ti.com [128.247.5.93]) by linux.omap.com (Postfix) with ESMTP id 83F3280626 for ; Fri, 28 Feb 2014 07:52:10 -0600 (CST) Received: from neches.ext.ti.com (neches.ext.ti.com [192.91.81.29]) by dflxv17.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1SDqAqn028807 for ; Fri, 28 Feb 2014 07:52:10 -0600 Received: from mail6.bemta8.messagelabs.com (mail6.bemta8.messagelabs.com [216.82.243.55]) by neches.ext.ti.com (8.13.7/8.13.7) with ESMTP id s1SDq9W7031962 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 28 Feb 2014 07:52:10 -0600 Received: from [216.82.241.195:33089] by server-4.bemta-8.messagelabs.com id C9/3A-07043-98490135; Fri, 28 Feb 2014 13:52:09 +0000 X-Env-Sender: prabhakar.csengg@gmail.com X-Msg-Ref: server-11.tower-119.messagelabs.com!1393595528!25763615!1 X-Originating-IP: [209.85.220.180] X-SpamReason: No, hits=0.3 required=7.0 tests=ML_RADAR_SPEW_LINKS_14, RCVD_BY_IP,spamassassin: X-StarScan-Received: X-StarScan-Version: 6.9.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 16009 invoked from network); 28 Feb 2014 13:52:09 -0000 Received: from mail-vc0-f180.google.com (HELO mail-vc0-f180.google.com) (209.85.220.180) by server-11.tower-119.messagelabs.com with RC4-SHA encrypted SMTP; 28 Feb 2014 13:52:09 -0000 Received: by mail-vc0-f180.google.com with SMTP id ks9so720589vcb.39 for ; Fri, 28 Feb 2014 05:52:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=R2X3ZiiYXfmjwBT0EvNMNAgNejTRMpUDNH5s6blvosM=; b=mPh6mhPjJHuU8qnOg0lqyczk0asCX6HIVRjrrWW24UTZwEQtSD3HJ6zANgYmeMEeiN D1c1u5eZGSfD+VGpNwgFjyu0I0kxflNt7CsgEBwO7ZPVg+CTYABWRKPj89FWRRp23QzJ +3yLIFs9BBfnQRMguBllg57rLPOqHDqdcZr+gt82zc31AH5GRPRZchOtZ6Sx0HSDAe0J GMKATWS1Ci0cPS96NN/so7St4chNqpjCZ6KLpqm9/gpmqqzkYSQLYQoDE2FdO/BEaEFN VgDb8L8OiSC3ZUhSZp/1Jfw1koXKM1HFkKUafLNclL67Of/LynWtgahnwTuLUa0VElrK +NAA== X-Received: by 10.58.4.138 with SMTP id k10mr2723099vek.8.1393595528570; Fri, 28 Feb 2014 05:52:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.221.58.212 with HTTP; Fri, 28 Feb 2014 05:51:48 -0800 (PST) In-Reply-To: <53105637.9000708@ti.com> References: <530CB5A6.1040101@ahsoftware.de> <53105637.9000708@ti.com> From: Prabhakar Lad Date: Fri, 28 Feb 2014 19:21:48 +0530 Message-ID: Subject: Re: Davinci gpio devicetree To: Sekhar Nori , CC: dlos X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 Alexander, On Fri, Feb 28, 2014 at 2:56 PM, Sekhar Nori wrote: > + Prabhakar > > On Tuesday 25 February 2014 08:54 PM, Alexander Holler wrote: >> Hello, >> >> I've seen kernel 3.14-rc contains support for gpios using devicetree. >> >> I've two comments: >> >> 1. #gpio-cells seems to be missing, >> 2. a small usage example (e.g. with gpio-leds or gpio-keys) would be nice. >> Yes #gpio-cells is missing, you can refer following patch fixing it, Regards, --Prabhakar Lad -----X------------X >From e8e96492926fe74012bb8ae8163411405a12057c Mon Sep 17 00:00:00 2001 From: "Lad, Prabhakar" Date: Fri, 28 Feb 2014 19:15:22 +0530 Subject: [PATCH] devicetree: bindings: gpio-davinci: fix documentation This patch adds missing #gpio-cells and also adds a usage example. Reported-by: Alexander Holler Signed-off-by: Lad, Prabhakar --- .../devicetree/bindings/gpio/gpio-davinci.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Documentation/devicetree/bindings/gpio/gpio-davinci.txt b/Documentation/devicetree/bindings/gpio/gpio-davinci.txt index a2e839d..fb96b94 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-davinci.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-davinci.txt @@ -8,6 +8,10 @@ Required Properties: - gpio-controller : Marks the device node as a gpio controller. +- #gpio-cells : Should be two. + - first cell is the pin number + - second cell is used to specify optional parameters (unused) + - interrupt-parent: phandle of the parent interrupt controller. - interrupts: Array of GPIO interrupt number. Only banked or unbanked IRQs are @@ -27,6 +31,7 @@ Example: gpio: gpio@1e26000 { compatible = "ti,dm6441-gpio"; gpio-controller; + #gpio-cells = <2>; reg = <0x226000 0x1000>; interrupt-parent = <&intc>; interrupts = <42 IRQ_TYPE_EDGE_BOTH 43 IRQ_TYPE_EDGE_BOTH @@ -39,3 +44,16 @@ gpio: gpio@1e26000 { interrupt-controller; #interrupt-cells = <2>; }; + +leds { + compatible = "gpio-leds"; + led1 { + label = "davinci:green:usr1"; + gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>; + }; + + led2 { + label = "davinci:red:debug1"; + gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; + }; +};