[U-Boot] [PATCH] TI DaVinci: Driver for the davinci SPI controller

Mike Frysinger vapier at gentoo.org
Tue Jan 5 07:01:49 CET 2010


On Monday 04 January 2010 04:46:19 Sudhakar Rajashekhara wrote:
> On Fri, Dec 25, 2009 at 22:41:13, Dirk Behme wrote:
> > I wonder if all (SPI API) functions from include/spi.h should be
> > implemented? I.e. do we need (dummy) functions for spi_cs_is_valid(),
> > spi_cs_activate() and spi_cs_deactivate(), too? Just in case a driver
> > does use them.
> 
> Currently none of the SPI Flash drivers are using the above functions. I'll
> implement the above functions as dummy and later as and when the need
>  arises, these functions will be implemented.

considering the SPI protocol, the implementation for the spi_cs_* functions 
should fall naturally into place if the driver is architected properly.  in 
other words, your bus driver should already be relying on these functions --  
you call them when you begin/end a transfer.

same goes for spi_cs_is_valid ... your spi_setup_slave function shouldnt be 
accepting any random cs value given to it.

the Blackfin driver shows that these are all pretty trivial to get right.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100105/be908eaf/attachment.pgp 


More information about the U-Boot mailing list