From patchwork Tue Feb 23 07:54:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Pargmann X-Patchwork-Id: 586743 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 322AF1402B4 for ; Tue, 23 Feb 2016 18:55:18 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756212AbcBWHzR (ORCPT ); Tue, 23 Feb 2016 02:55:17 -0500 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:55445 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751926AbcBWHzQ (ORCPT ); Tue, 23 Feb 2016 02:55:16 -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 1aY7o8-0000hj-45; Tue, 23 Feb 2016 08:54:56 +0100 Received: from mpa by dude.hi.pengutronix.de with local (Exim 4.86) (envelope-from ) id 1aY7o7-0007jY-87; Tue, 23 Feb 2016 08:54:55 +0100 From: Markus Pargmann To: Linus Walleij Cc: linux-gpio@vger.kernel.org, Alexandre Courbot , Johan Hovold , Michael Welling , Bamvor Jian Zhang , Grant Likely , devicetree@vger.kernel.org, Markus Pargmann Subject: [PATCH 3/4] gpio: dt-bindings: Declare gpio-hog optional for GPIO subnodes Date: Tue, 23 Feb 2016 08:54:48 +0100 Message-Id: <1456214089-13954-3-git-send-email-mpa@pengutronix.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1456214089-13954-1-git-send-email-mpa@pengutronix.de> References: <1456214089-13954-1-git-send-email-mpa@pengutronix.de> X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: mpa@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-gpio@vger.kernel.org Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Reuse the GPIO hogging DT bindings for more generic specifications of the GPIO. Therefore gpio-hog is declared optional. Signed-off-by: Markus Pargmann --- Documentation/devicetree/bindings/gpio/gpio.txt | 28 ++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt index 069cdf6f9dac..820898e0649c 100644 --- a/Documentation/devicetree/bindings/gpio/gpio.txt +++ b/Documentation/devicetree/bindings/gpio/gpio.txt @@ -155,13 +155,25 @@ gpio-controller@00000000 { ngpios = <18>; } -The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism -providing automatic GPIO request and configuration as part of the -gpio-controller's driver probe function. +The GPIO chip may contain subnodes describing specific GPIOs of this +controller. These GPIO nodes can be used to define GPIO hogging or define GPIO +names. +GPIO hogging is a mechanism providing automatic GPIO request and configuration +as part of the gpio-controller's driver probe function. -Each GPIO hog definition is represented as a child node of the GPIO controller. +Each GPIO node consists of the following properties: Required properties: +- gpios: Store the GPIO information (id, flags, ...). Shall contain the + number of cells specified in its parent node (GPIO controller + node). + +Optional properties: +- line-name: The GPIO name. If not present the node name is used. - gpio-hog: A property specifying that this child node represent a GPIO hog. + +For GPIO hogging which is specified by the "gpio-hog" property the following +additional properties are required. +Required properties for GPIO hogging: - gpios: Store the GPIO information (id, flags, ...). Shall contain the number of cells specified in its parent node (GPIO controller node). @@ -175,9 +187,6 @@ configuration. - output-high A property specifying to set the GPIO direction as output with the value high. -Optional properties: -- line-name: The GPIO label name. If not present the node name is used. - Example of two SOC GPIO banks defined as gpio-controller nodes: qe_pio_a: gpio-controller@1400 { @@ -192,6 +201,11 @@ Example of two SOC GPIO banks defined as gpio-controller nodes: output-low; line-name = "foo-bar-gpio"; }; + + line_c { + gpios = <7 0>; + line-name = "SCHEMATIC_LINE_NAME"; + }; }; qe_pio_e: gpio-controller@1460 {