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 4EA9ADE598 for ; Thu, 22 May 2008 03:05:08 +1000 (EST) Date: Wed, 21 May 2008 21:05:06 +0400 From: Anton Vorontsov To: Grant Likely Subject: Re: [PATCH 1/4] [SPI] spi_mpc83xx: convert to the OF platform driver Message-ID: <20080521170506.GA22021@polina.dev.rtsoft.ru> References: <20080521154103.GA32577@polina.dev.rtsoft.ru> <20080521154137.GA4566@polina.dev.rtsoft.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 In-Reply-To: Cc: linuxppc-dev@ozlabs.org, Gary Jennejohn , Guennadi Liakhovetski Reply-To: avorontsov@ru.mvista.com List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, May 21, 2008 at 10:50:02AM -0600, Grant Likely wrote: [..] > > + > > + master->num_chipselect = of_num_children(np); > > This assumes that there are no gaps in the assigned CS numbers of > child nodes, or that the child nodes are an exhaustive list of > attached devices, neither of which may be true. num_chipselect should > be calculated from the number of GPIOs specified instead. [I'm not arguing just a thought.] - every SPI device must have its own chip-select, otherwise SPI device node should not be a part of a SPI controller node; - or there is just once device on the SPI bus with chip-select always asserted, no gpios = <> is specified (this case is implemented); - or the SPI is bridged, gpios = <> should list behind-the-bridge devices' chip-selects, and driver should understand that there is a "special" (bridge) device somewhere on the bus (not implemented). -- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2