From patchwork Fri May 26 19:07:03 2017 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: 9751007 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3A57D60249 for ; Fri, 26 May 2017 19:07:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2949228307 for ; Fri, 26 May 2017 19:07:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E4F5283D9; Fri, 26 May 2017 19:07:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BA2B728307 for ; Fri, 26 May 2017 19:07:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=gvzwx17v3z1Yyyq+AF4LUMbvMpuhlCE7/jl+mVvXR44=; b=rclaJncxsWGmcU +nRqokRW+iolVoTe17K4cQFjp5oBSsF02jOyX3KG6MCSe+Beq8RUNoeBLpzSdwYGCkB1/Tmvq0yA6 7aKYqFC5vHRFqgqjxFL9mcIaTsNPqCMVRTuvFFwwNu7W8GC8WTKqKFeFyRgsuExcGeKSbLsucI0bg 9eyY+JJmGLTYtd6ldprbAhhbbQ2Vi+ur66Y8VGjIV9tsI5Um6EJ81iQEvlQeNcZbMSx5RhhXyIly8 gp+dG6G2VORdHQ0nPKvQda9w7xBd6XzAt8uzYzFvGrv+RwfNaKOwCbjdlDG1g7xn33625u7RktHC1 lhfYH+IABSi6uBeRQQow==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dEKaN-0001YX-UA; Fri, 26 May 2017 19:07:43 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dEKaK-0001NP-3X for linux-arm-kernel@lists.infradead.org; Fri, 26 May 2017 19:07:42 +0000 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1dEKZn-0005ZY-0h; Fri, 26 May 2017 21:07:07 +0200 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.84_2) (envelope-from ) id 1dEKZl-0001M9-76; Fri, 26 May 2017 21:07:05 +0200 Date: Fri, 26 May 2017 21:07:03 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Andrew Lunn , Rob Herring , Frank Rowand , Arnd Bergmann Subject: [PATCH v2 1/5] dts: gpio_atmel: adapt binding doc to reality Message-ID: <20170526190703.t5fab33peh2cmobm@taurus.defre.kleine-koenig.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170526185214.GB20946@lunn.ch> User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 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-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170526_120740_321915_D4EF5D4F X-CRM114-Status: GOOD ( 14.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marek Vasut , devicetree@vger.kernel.org, Jean-Christophe Plagniol-Villard , Alexandre Belloni , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The second cell in a gpio reference is used to pass GPIO_ACTIVE_LOW or GPIO_ACTIVE_HIGH. The gpio device can also be used as irq controller and a reference can contain the IRQ_TYPE_* values in the second cell. Signed-off-by: Uwe Kleine-König --- On Fri, May 26, 2017 at 08:52:14PM +0200, Andrew Lunn wrote: > > +- interrupt-controller: Marks the device node as a GPIO controller. > > Interrupt controller, not GPIO controller. > > > +- #interrupt-cells: Should be two. The first cell is the pin number and the > > + second cell is used to specify irq type flags: > > + 1 = low-to-high edge triggered. > > + 2 = high-to-low edge triggered. > > + 4 = active high level-sensitive. > > + 8 = active low level-sensitive. > > Maybe just reference interrupts.txt? ack for both and changed in this v2. Thanks Uwe Documentation/devicetree/bindings/gpio/gpio_atmel.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/gpio/gpio_atmel.txt b/Documentation/devicetree/bindings/gpio/gpio_atmel.txt --- a/Documentation/devicetree/bindings/gpio/gpio_atmel.txt +++ b/Documentation/devicetree/bindings/gpio/gpio_atmel.txt @@ -5,9 +5,13 @@ Required properties: - reg: Should contain GPIO controller registers location and length - interrupts: Should be the port interrupt shared by all the pins. - #gpio-cells: Should be two. The first cell is the pin number and - the second cell is used to specify optional parameters (currently - unused). + the second cell is used to specify optional parameters to declare if the GPIO + is active high or low. See gpio.txt. - gpio-controller: Marks the device node as a GPIO controller. +- interrupt-controller: Marks the device node as an interrupt controller. +- #interrupt-cells: Should be two. The first cell is the pin number and the + second cell is used to specify irq type flags, see the two cell description + in interrupt-controller/interrupts.txt for details. optional properties: - #gpio-lines: Number of gpio if absent 32. @@ -21,5 +25,7 @@ Example: #gpio-cells = <2>; gpio-controller; #gpio-lines = <19>; + interrupt-controller; + #interrupt-cells = <2>; };