From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anton Vorontsov Subject: Re: [PATCH v5] spi: Add PPC4xx SPI driver Date: Tue, 6 Jan 2009 05:06:03 +0300 Message-ID: <20090106020603.GA14074@oksana.dev.rtsoft.ru> References: <1227628088-10849-1-git-send-email-sr@denx.de> Reply-To: avorontsov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org, linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org, spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Stefan Roese Return-path: Content-Disposition: inline In-Reply-To: <1227628088-10849-1-git-send-email-sr-ynQEQJNshbs@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org Hi Stefan, On Tue, Nov 25, 2008 at 04:48:08PM +0100, 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 > Signed-off-by: Wolfgang Ocker > Acked-by: Josh Boyer > --- [...] > +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. -- Anton Vorontsov email: cbouatmailru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org irc://irc.freenode.net/bd2 ------------------------------------------------------------------------------ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from buildserver.ru.mvista.com (unknown [85.21.88.6]) by ozlabs.org (Postfix) with ESMTP id A3471DE398 for ; Tue, 6 Jan 2009 13:06:06 +1100 (EST) Date: Tue, 6 Jan 2009 05:06:03 +0300 From: Anton Vorontsov To: Stefan Roese Subject: Re: [spi-devel-general] [PATCH v5] spi: Add PPC4xx SPI driver Message-ID: <20090106020603.GA14074@oksana.dev.rtsoft.ru> References: <1227628088-10849-1-git-send-email-sr@denx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 In-Reply-To: <1227628088-10849-1-git-send-email-sr@denx.de> Cc: david-b@pacbell.net, linuxppc-dev@ozlabs.org, spi-devel-general@lists.sourceforge.net Reply-To: avorontsov@ru.mvista.com List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Stefan, On Tue, Nov 25, 2008 at 04:48:08PM +0100, 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 > Signed-off-by: Wolfgang Ocker > Acked-by: Josh Boyer > --- [...] > +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. -- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2