[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F807D41.5000008@antcom.de>
Date: Sat, 07 Apr 2012 19:45:37 +0200
From: Roland Stigge <stigge@...com.de>
To: "jonsmirl@...il.com" <jonsmirl@...il.com>
CC: Grant Likely <grant.likely@...retlab.ca>, arm@...nel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linus.walleij@...ricsson.com
Subject: Re: [PATCH v2] gpio: Device tree support for LPC32xx
On 07/04/12 19:17, jonsmirl@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists