David Brownell wrote:
> On Friday 29 February 2008, Ned Forrester wrote:
>> David Brownell wrote:
> 
>>> The chipselect number is always useful when the SPI bus has more
>>> than one slave; it's how the slaves are distinguished.
>> Ahh... Here is a place where pxa2xx-spi departs from the SPI framework
>> by choice.  That driver never uses spi_device.chip_select
> 
> Not directly.  Indirectly, since each chip_select is associated
> with a unique pxa2xx_spi_chip.cs_control().  The chipselect number
> (and signal) still distinguishes chips from each other.

Maybe we're just discussing semantics, but the last sentence does not
apply to this driver.  pxa2xx_spi.c never references the field
spi_device.chip_select.  The string "chip_select" appears nowhere in the
code.  You can assign spi_device.chip_select=0 for all chips, and as
long as you supply a unique
spi_device->controller_data->pxa2xx_spi_chip.cs_control for each chip,
chip select will work as intended.

So in the sense that I mean, spi_device.chip_select field is unused; it
does not need to be unique between chips.  Yes, of course there have to
be unique spi_device structures for each chip, and through a driver
private means (spi_device.controller_data) the chip select mechanism for
each chip becomes known to the driver.

It was this lack of example for any use of spi_device.chip_select in
pxa2xx_spi.c that led to my confusion about how spi_device.chip_select
was supposed to be used.

-- 
Ned Forrester                                       [EMAIL PROTECTED]
Oceanographic Systems Lab                                  508-289-2226
Applied Ocean Physics and Engineering Dept.
Woods Hole Oceanographic Institution          Woods Hole, MA 02543, USA
http://www.whoi.edu/sbl/liteSite.do?litesiteid=7212
http://www.whoi.edu/hpb/Site.do?id=1532
http://www.whoi.edu/page.do?pid=10079


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to