From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anton Vorontsov Subject: Re: GPIO - marking individual pins (not) available in device tree Date: Fri, 24 Oct 2008 21:01:28 +0400 Message-ID: <20081024170128.GA20577@oksana.dev.rtsoft.ru> References: <4900ED81.3040202@genesi-usa.com> <20081024164120.GA14350@oksana.dev.rtsoft.ru> Reply-To: avorontsov@ru.mvista.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20081024164120.GA14350@oksana.dev.rtsoft.ru> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+glppd-linuxppc64-dev=m.gmane.org@ozlabs.org Errors-To: linuxppc-dev-bounces+glppd-linuxppc64-dev=m.gmane.org@ozlabs.org To: Matt Sealey Cc: linuxppc-dev list , devicetree-discuss list , David Gibson List-Id: devicetree@vger.kernel.org On Fri, Oct 24, 2008 at 08:41:20PM +0400, Anton Vorontsov wrote: [...] > > So, how do we define in a bank of GPIOs, which ones are free for use, > > without them being attached to a device and given as a "gpios" property? > > > > 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,-gpio-header"; gpios = <&standard 16 0 &standard 17 0 &wakeup 18 0>; } And the driver whould know that on this particular third gpio is the wakeup one? -- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2