[PATCH v2 4/4] spi:Add Freescale DSPI driver for Vybrid VF610 platform

Mark Brown broonie at kernel.org
Sun Jul 28 14:41:11 EDT 2013


On Fri, Jul 26, 2013 at 09:21:30AM +0200, Sascha Hauer wrote:
> On Wed, Jul 24, 2013 at 01:32:23PM +0800, Chao Fu wrote:

Sascha, please delete unneeded context from your mails - it makes it
much easier to find the new text.

> > +	tx_word = is_word_transfer(dspi);
> > +	/* If we are in word mode, but only have a single byte to transfer
> > +	 * then switch to byte mode temporarily.  Will switch back at the
> > +	 * end of the transfer. */

> Not sure if I understand this, but if you are in word mode then I would
> consider it a bug when there's only one byte to transfer.

Yes, this is a definite bug - especially since SPI in word mode has a
fixed word order on the bus.  The driver should never put the hardware
into a word size other than that explicitly requested by the client and
then it should insist on getting exact multiples of that word size.

> > +static int dspi_prepare_transfer_hw(struct spi_master *master)
> > +{
> > +	struct fsl_dspi *dspi = spi_master_get_devdata(master);
> > +
> > +	pm_runtime_get_sync(&dspi->pdev->dev);
> > +
> > +	return 0;
> > +}

I just posted a patch series which would allow you to have the core do
this for you, please rebase on top of that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130728/fb3f560b/attachment.sig>


More information about the linux-arm-kernel mailing list