From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 24 Oct 2008 15:58:24 +1100 From: David Gibson To: Matt Sealey Subject: Re: GPIO - marking individual pins (not) available in device tree Message-ID: <20081024045824.GJ4267@yookeroo.seuss> References: <4900ED81.3040202@genesi-usa.com> <4900F90B.80703@firmworks.com> <4901032F.3090805@genesi-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <4901032F.3090805@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 Thu, Oct 23, 2008 at 06:05:19PM -0500, Matt Sealey wrote: > > > Mitch Bradley wrote: > [snip] > >> You could adopt the convention that preassigned GPIOs must be >> represented by subordinate nodes, and any GPIO that is not covered by a >> subordinate node's "reg" property is implicitly available. That's the >> way it works for other address spaces. [snip] > At the moment it's encoded as: > > gpios = <&controller-phandle pin-number pin-flags> Actually, it's not. The gpios property is: The "gpio-descriptor" (like an interrupt descriptor from IEEE1275) is a blob with number of cells equal to #gpio-cells from the controller. The internal layout of the descriptor is specific to the gpio controller. Typically it includes a pin number and flags/mode. However, it could be, and sometimes is, encoded as bank-number / pin-number / flags. Or even something more involved still, if that's useful for the specific gpio controller in question. Or it could simply be pin number if it's associated with a really simple gpio controller where all pins have the same behaviour. -- 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