[spi-devel-general] [PATCH 2/3] [SPI] Add new mode: SPI_LOOP

David Brownell david-b at pacbell.net
Thu Aug 2 04:25:47 EST 2007


On Thursday 26 July 2007, Ned Forrester wrote:
> David Brownell wrote:
> > On Thursday 26 July 2007, Anton Vorontsov wrote:
> >> Loopback mode is supported by various controllers, this mode
> >> is useful for testing, especially in conjunction with spidev
> >> driver.
> > 
> > ISTR that Stephen Street provided a loopback mode for debug
> > in his pxa2xx_spi code.  And I know you're fight that this
> > mode shows up in a lot of hardware.
> > 
> > Comments, anyone?  This seems like a fair way to expose this
> > mechanism.  And I tend to agree that it'd mostly be useful in
> > conjunction with "spidev".
> 
> Yes, it is in pxa2xx_spi.  It is passed in a structure that is attached 
> to spi_board_info.controller_data.  I have used it to great effect to 
> test data modes in the driver for which I have no external hardware 
> support: various bits/word, clock frequencies, fifo thresholds, dma 
> burst sizes, etc.

Well, the SPI_LOOP stuff is now in kernel.org GIT and 2.6.23-rc2,
so if someone wants to update pxa2xx_spi to support this through
spi->mode instead of controller data, now is a good time to start
working on that.

- Dave



More information about the Linuxppc-dev mailing list