[spi-devel-general] [PATCH v5] spi: Add PPC4xx SPI driver

Stefan Roese sr at denx.de
Tue Jan 6 19:14:19 EST 2009


Hi Anton,

On Tuesday 06 January 2009, Anton Vorontsov wrote:
> > This adds a SPI driver for the SPI controller found in the IBM/AMCC
> > 4xx PowerPC's.
> >
> > Signed-off-by: Stefan Roese <sr at denx.de>
> > Signed-off-by: Wolfgang Ocker <weo at reccoware.de>
> > Acked-by: Josh Boyer <jwboyer at linux.vnet.ibm.com>
> > ---
>
> [...]
>
> > +static unsigned int of_num_gpios(struct device_node *node)
> > +{
> > +	unsigned int num = 0;
> > +
> > +	while (gpio_is_valid(of_get_gpio(node, num)))
> > +		num++;
> > +	return num;
> > +}
>
> FYI, as of commit 749820928a2fd47ff536773d869d2c3f8038b7d1 ("of/gpio:
> Implement of_gpio_count()") you can use of_gpio_count() from
> linux/of_gpio.h.

Thanks for the hint. I'll use it in the next version.

Best regards,
Stefan



More information about the Linuxppc-dev mailing list