From: stigge@antcom.de (Roland Stigge)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] gpio: Device tree support for LPC32xx
Date: Sat, 07 Apr 2012 19:45:37 +0200 [thread overview]
Message-ID: <4F807D41.5000008@antcom.de> (raw)
In-Reply-To: <CAKON4OxuP6AytcJDtDvbTaho4vFvUTQ0VfJiBnN5QEbK1xo1XQ@mail.gmail.com>
On 07/04/12 19:17, jonsmirl at gmail.com wrote:
>> Please consider how the groups are specified in
>> drivers/gpio/gpio-lpc32xx.c. They each have different numbers of lines
>> and GPIO / GPI / GPO functionality. So they also have different callback
>> sets, and we need to do separate gpiochip_add()s which leads to the
>> separate gpio-bank specifications in the dtsi file. Separate enabling of
>> those banks via OF are a nice by-product.
>
> When you have six banks of 32b registers with sparse, active GPIOs in
> the banks, is there any advantage to saying bank one has 8 gpios, bank
> 2 has 14, bank 3 has 2, etc in the gpiochip? Or just just register
> them as six banks of 32 GPIOs without indicating which are
> valid/invalid?
I think it is a good idea to only register GPIOs that are real when we
already have many (~100) instead of registering hundreds of invalid
extra ones (that will _always_ be invalid for this very driver).
Also corresponds nicely to the hardware specs when there are banks of
odd sizes which can be found registered accordingly in the kernel.
Roland
WARNING: multiple messages have this Message-ID (diff)
From: Roland Stigge <stigge@antcom.de>
To: "jonsmirl@gmail.com" <jonsmirl@gmail.com>
Cc: Grant Likely <grant.likely@secretlab.ca>,
arm@kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linus.walleij@stericsson.com
Subject: Re: [PATCH v2] gpio: Device tree support for LPC32xx
Date: Sat, 07 Apr 2012 19:45:37 +0200 [thread overview]
Message-ID: <4F807D41.5000008@antcom.de> (raw)
In-Reply-To: <CAKON4OxuP6AytcJDtDvbTaho4vFvUTQ0VfJiBnN5QEbK1xo1XQ@mail.gmail.com>
On 07/04/12 19:17, jonsmirl@gmail.com wrote:
>> Please consider how the groups are specified in
>> drivers/gpio/gpio-lpc32xx.c. They each have different numbers of lines
>> and GPIO / GPI / GPO functionality. So they also have different callback
>> sets, and we need to do separate gpiochip_add()s which leads to the
>> separate gpio-bank specifications in the dtsi file. Separate enabling of
>> those banks via OF are a nice by-product.
>
> When you have six banks of 32b registers with sparse, active GPIOs in
> the banks, is there any advantage to saying bank one has 8 gpios, bank
> 2 has 14, bank 3 has 2, etc in the gpiochip? Or just just register
> them as six banks of 32 GPIOs without indicating which are
> valid/invalid?
I think it is a good idea to only register GPIOs that are real when we
already have many (~100) instead of registering hundreds of invalid
extra ones (that will _always_ be invalid for this very driver).
Also corresponds nicely to the hardware specs when there are banks of
odd sizes which can be found registered accordingly in the kernel.
Roland
next prev parent reply other threads:[~2012-04-07 17:45 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-03 23:58 [PATCH v2] gpio: Device tree support for LPC32xx Roland Stigge
2012-04-03 23:58 ` Roland Stigge
2012-04-04 8:48 ` Arnd Bergmann
2012-04-04 8:48 ` Arnd Bergmann
2012-04-04 11:08 ` Roland Stigge
2012-04-04 11:08 ` Roland Stigge
2012-04-07 3:53 ` Grant Likely
2012-04-07 3:53 ` Grant Likely
2012-04-07 13:50 ` Roland Stigge
2012-04-07 13:50 ` Roland Stigge
2012-04-07 14:19 ` Roland Stigge
2012-04-07 14:19 ` Roland Stigge
2012-04-07 17:17 ` jonsmirl at gmail.com
2012-04-07 17:17 ` jonsmirl
2012-04-07 17:45 ` Roland Stigge [this message]
2012-04-07 17:45 ` Roland Stigge
2012-04-07 18:54 ` jonsmirl at gmail.com
2012-04-07 18:54 ` jonsmirl
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=4F807D41.5000008@antcom.de \
--to=stigge@antcom.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.