lkml.org 
[lkml]   [2008]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] atmel_spi: support zero length transfer
Date
Hi Dave!

On Thursday 21 February 2008, David Brownell wrote:
> > David, do you think writing 0 bytes is a valid use of this API?
>
> Just a zero byte transfer ... no, though it depends what you mean
> by "valid". (I'm not sure I'd expect all controller drivers to
> reject such requests.) That has no effect on bits-on-the-wire,
> and would make trouble for various DMA engines.
So, the behaviour is undefined, something between 'crash my dma engine',
'assert chip select and wait some time', or 'do_nothing'...

...
> This *specific* usage might arguably belong in spi_device, since
> it's a delay required after chipselect goes active and before any
> bytes get transferred. It's clearly not a per-transfer thing, and
> should also apply after a temporary mid-message chip deselect.
Ack, should be in spi_device (same remark for spi_transfer->delay_usec?).

>
> And it would probably deserve a mode flag (sigh) unless someone
> can update every master controller driver.
Supporting the zero-len-write means checking and perhpaps updating each driver
for the benefit of having an unknown length delay.

We should add the delay field in the spi_device, but this means more work.

Is this kind of device so common that we need to do all that work? or can we
leave it as is (verified to work only with atmel_spi)?

Regards

Marc


\
 
 \ /
  Last update: 2008-02-22 10:33    [W:0.095 / U:0.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site