GPIO - marking individual pins (not) available in device tree

Matt Sealey matt at genesi-usa.com
Sat Oct 25 09:17:42 EST 2008



Anton Vorontsov wrote:
> On Fri, Oct 24, 2008 at 08:41:20PM +0400, Anton Vorontsov wrote:
> [...]
>>> Would we suggest a node;
>>>
>>> gpio-header {
>>> 	compatible = "bplan,efika-gpio";
>>> 	gpios = <&gpio-standard 16 0 17 0>;
>>> };
>>>
>>> gpio-header2 {
>>> 	compatible = "bplan,efika-gpio-wkup";
>>> 	gpios = <&gpio-wkup 18 0>;
>>> };
>> IMO this looks very reasonable. You properly describe the hardware:
>> physical device (header) and its resources.
> 
> If there are actually two headers, that is. If you use two nodes
> just to specify which gpio is wkup, that is's a bit ugly... Why not
> 
> gpio-header {
> 	compatible = "bplan,<board>-gpio-header";
> 	gpios = <&standard 16 0
> 		 &standard 17 0
> 		 &wakeup 18 0>;
> }
> 
> And the driver whould know that on this particular <board>
> third gpio is the wakeup one?

Good point, I concede to your much better plan :D

Back to the other discussion, where we give individual GPIOs some
names so they are detectable and not just programmable as a bank,
do you have any ideas about that? :/

-- 
Matt Sealey <matt at genesi-usa.com>
Genesi, Manager, Developer Relations



More information about the Linuxppc-dev mailing list