From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 28 Oct 2008 12:50:03 +1100 From: David Gibson To: Matt Sealey Subject: Re: GPIO - marking individual pins (not) available in device tree Message-ID: <20081028015003.GA28674@yookeroo.seuss> References: <4901032F.3090805@genesi-usa.com> <49011C42.2020101@firmworks.com> <20081024032944.GE4267@yookeroo.seuss> <49014C69.8020408@firmworks.com> <20081024044511.GI4267@yookeroo.seuss> <490248C2.9020104@genesi-usa.com> <20081026234747.GD22339@yookeroo.seuss> <4905E0DC.104@genesi-usa.com> <20081028001511.GD26424@yookeroo.seuss> <4906620B.7080308@genesi-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <4906620B.7080308@genesi-usa.com> Cc: Mitch Bradley , linuxppc-dev list , devicetree-discuss list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, Oct 27, 2008 at 07:51:23PM -0500, Matt Sealey wrote: > > > David Gibson wrote: >> On Mon, Oct 27, 2008 at 10:40:12AM -0500, Matt Sealey wrote: >> >> Uh.. no. The gpio specifier has a format that's gpio controller >> specific, but it must include the actual pin number, although exactly >> how it's encoded might vary. >> >> So, you use >> gpios = <&controller pin1-specifier &controller pin8-specifier >> &controller pin9-specifier &controller pin11-specifier >> &controller pin15-specifier &controller pin30-specifier>; > > Okay that makes some more sense to me. > > So now my qualm is back to the beginning of the discussion. How do > we encode the purpose of those pins reliably and within some > standard framework, without getting *driver* specific? Um.. I fail to see how the purpose of a pin can be not driver specific. > Take the example of an LCD controller with an 8-bit bus and two > control pins, if you put all 10 into a gpios property, explicit > knowledge of the purpose of those pins is lost. It must then be > encoded directly into the driver.. Yes, this is normal. Just as the driver for a device must know the function of each entry in 'reg' for its specific device, and what each interrupt in 'interrupts' is used for. > I liked Anton's suggestion of grouping them and creating new nodes, > but you didn't like it when it was suggested before, so, I'm > wondering if there's a middle ground.. I have no problem with the suggestion of gpio_header nodes, if that's what you're referring to (although I do suspect occasions on which they are useful would be limited). -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson