From: Mike Frysinger Date: Tue, 5 Jan 2010 01:01:49 -0500 Subject: [U-Boot] [PATCH] TI DaVinci: Driver for the davinci SPI controller In-Reply-To: <02f601ca8d22$c42c6a10$4c853e30$@raj@ti.com> References: <1261554276-20449-1-git-send-email-sudhakar.raj@ti.com> <4B34F231.9000703@googlemail.com> <02f601ca8d22$c42c6a10$4c853e30$@raj@ti.com> Message-ID: <201001050101.51510.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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