Subject: Re: [PATCH v5] spi: Add PPC4xx SPI driver

From: "Steven A. Falco" <[email-masked]>
Date: Tue, 09 Dec 2008 16:48:12 -0500

Stefan Roese wrote:
> This adds a SPI driver for the SPI controller found in the IBM/AMCC
> 4xx PowerPC's.
> 
> Signed-off-by: Stefan Roese <[email-masked]>
> Signed-off-by: Wolfgang Ocker <[email-masked]>
> Acked-by: Josh Boyer <[email-masked]>
> ---

I have a question as to how to use this driver.  of_num_gpios() starts
testing for gpio's at num = 0, and stops at the first invalid one.
However, gpio numbers are apparently allocated dynamically from 255 down,
meaning that there probably is no gpio-0.

For example, on my Sequoia board I have gpiochip176, gpiochip192,
and gpiochip224.  So, of_num_gpios() returns zero, even though there
are 72 gpio's on my board.

This gets back to an earlier discussion about setting the gpio index
of each controller, which was rejected, IIRC.  If we could set the
base gpio of each chip, we could start at zero and use consecutive
numbers.  Failing that, it seems that Stefan's SPI driver needs to
probe the entire 0-255 gpio space.

How is this intended to work?  An example .dts would be greatly
appreciated.

	Steve