From: Stephen Warren <swarren@wwwdotorg.org>
To: Rob Herring <robherring2@gmail.com>
Cc: Thierry Reding <thierry.reding@avionic-design.de>,
devicetree-discuss@lists.ozlabs.org,
Wolfram Sang <w.sang@pengutronix.de>,
Linus Walleij <linus.walleij@stericsson.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support
Date: Tue, 31 Jul 2012 17:22:40 -0600 [thread overview]
Message-ID: <501868C0.3090806@wwwdotorg.org> (raw)
In-Reply-To: <50185619.5090706@gmail.com>
On 07/31/2012 04:03 PM, Rob Herring wrote:
> On 07/30/2012 02:47 AM, Thierry Reding wrote:
>> On Sun, Jul 29, 2012 at 07:13:57PM +0200, Linus Walleij wrote:
>>> On Mon, Jul 23, 2012 at 1:59 PM, Thierry Reding
>>> <thierry.reding@avionic-design.de> wrote:
>>>
>>>> This commit adds a driver for the Avionic Design N-bit GPIO expander.
>>>> The expander provides a variable number of GPIO pins with interrupt
>>>> support.
>>>> diff --git a/Documentation/devicetree/bindings/gpio/gpio-adnp.txt b/Documentation/devicetree/bindings/gpio/gpio-adnp.txt
>>>> +Required properties:
>>>> +- nr-gpios: The number of pins supported by the controller.
> For nr-gpios, I think it is typically not needed. Generally, you will
> know how many gpio lines the h/w has based on the compatible string. If
> this part really is the same part but different packages with different
> numbers of gpio, then this property makes sense. Otherwise, I would say
> drop it.
>
> If your goal is how many gpios are you using, you really need a bitmap
> instead if you want it to be generic.
>
> IIRC, Tegra also needed this in that they N instances of some number of
> bits and the registers are interleaved so they can't have separate nodes.
In the end, I got away without having a separate property to represent
this. Instead, the code keys off the number of interrupts listed in the
interrupts property, there being one interrupt per GPIO bank, and hence
dynamically instantiates the number of banks based on that.
next prev parent reply other threads:[~2012-07-31 23:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-23 11:59 [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support Thierry Reding
[not found] ` <1343044770-6591-1-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2012-07-29 17:13 ` Linus Walleij
2012-07-29 20:27 ` Arnd Bergmann
[not found] ` <CACRpkdaZcUvcJMUZTqCEU5FQYhE3EvSSfUEnEx0dYRt-6x5Nig-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-07-30 7:47 ` Thierry Reding
[not found] ` <20120730074714.GC15245-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-07-31 22:03 ` Rob Herring
2012-07-31 23:22 ` Stephen Warren [this message]
[not found] ` <50185619.5090706-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-08-02 6:18 ` Thierry Reding
2012-08-05 10:50 ` Linus Walleij
[not found] ` <CACRpkdbrdWw_HR91r72aB_S2+vxiaSBKHwW+Tsmi8pKk9VsgFg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-08-06 5:11 ` Thierry Reding
[not found] ` <20120806051144.GA12642-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-08-06 6:39 ` Linus Walleij
2012-08-09 6:27 ` Thierry Reding
2012-08-09 20:20 ` Thierry Reding
[not found] ` <20120809202054.GA24503-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-08-10 8:19 ` Linus Walleij
2012-08-10 8:35 ` Thierry Reding
[not found] ` <20120810083508.GA16251-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-08-10 8:41 ` Linus Walleij
2012-08-10 8:48 ` Thierry Reding
2012-08-10 9:15 ` Russell King - ARM Linux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=501868C0.3090806@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linus.walleij@stericsson.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robherring2@gmail.com \
--cc=thierry.reding@avionic-design.de \
--cc=w.sang@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).