Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752501Ab3FQQEB (ORCPT ); Mon, 17 Jun 2013 12:04:01 -0400 Received: from mail.abilis.ch ([195.70.19.74]:17733 "EHLO mail.abilis.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751090Ab3FQQEA convert rfc822-to-8bit (ORCPT ); Mon, 17 Jun 2013 12:04:00 -0400 Date: Mon, 17 Jun 2013 18:03:25 +0200 From: Christian Ruppert To: Stephen Warren Cc: Linus Walleij , Patrice CHOTARD , linux-kernel@vger.kernel.org, Grant Likely , Rob Herring , Rob Landley , Sascha Leuenberger , Pierrick Hascoet , devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org, Alexandre Courbot Subject: Re: [PATCH 2/2] Make non-linear GPIO ranges accesible from gpiolib Message-ID: <20130617160324.GA15853@ab42.lan> References: <1371128132-18266-2-git-send-email-christian.ruppert@abilis.com> <51BA3BC1.3090109@wwwdotorg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <51BA3BC1.3090109@wwwdotorg.org> User-Agent: Mutt/1.5.20 (2009-12-10) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2623 Lines: 64 On Thu, Jun 13, 2013 at 03:38:09PM -0600, Stephen Warren wrote: > On 06/13/2013 06:55 AM, Christian Ruppert wrote: > [...] > > diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt > > > +In addition, named groups of pins can be mapped to pin groups of a given > > +pin controller: > > + > > + gpio_pio_g: gpio-controller@1480 { > > + #gpio-cells = <2>; > > + compatible = "fsl,qe-pario-bank-e", "fsl,qe-pario-bank"; > > + reg = <0x1480 0x18>; > > + gpio-controller; > > + gpio-pingrps = <&pinctrl1 0>, <&pinctrl2 3>; > > + gpio-pingrp-names = "pctl1_gpio_g", "pctl2_gpio_g"; > > A few thoughts here: > > "gpio-pingrps" doesn't sound very similar to the existing "gpio-ranges". > Can we make their equivalent purpose more obvious by renaming this > "gpio-group-ranges"? > > I'm not actually even sure we need a new property for this, except for > the string group names. We could fold the new gpio-pingrps into the > existing gpio-ranges, whose entries have the format: > > > > ... by saying that if count==0, it means to use a group name instead of > a pinctrl-base value. We can insist that pinctrl-base==0 in this case > too. If we go made, count==0 could mean "special" and pinctrl-base==0 > could mean "by pinctrl group name", and other values of pinctrl-base > could be added later to mean other things! > > gpio-ranges = > <&pinctrl1 0 20 10>, /* Existing numeric style */ > <&pinctrl2 10 0 0>, /* Count==0, so group name style */ > <&pinctrl1 0 20 10>, /* Existing numeric style */ > gpio-ranges-group-names = > "", /* No group name required for entry 0 */ > "gr1", /* Group name for entry 1 */ > ""; /* No group name required for entry 2 */ > > Does this seem better? > [...] In the follow-up a patch set based on this proposal. I have also included our drivers (and device tree updates) with this to see how this looks in a real (working) system. To me it does actually look quite nice and logical but take a look at it yourselves and tell me what you think. Greetings, Christian -- Christian Ruppert , /| Tel: +41/(0)22 816 19-42 //| 3, Chemin du Pr?-Fleuri _// | bilis Systems CH-1228 Plan-les-Ouates -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/