linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Continuous streaming SPI transfer
@ 2012-09-27 22:09 Nuutti Kotivuori
       [not found] ` <87zk4bazje.fsf-Nc554NfcwGrUGg1qMAD/drNAH6kLmebB@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Nuutti Kotivuori @ 2012-09-27 22:09 UTC (permalink / raw)
  To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hello,

I would like to use SPI in a streaming fashion, with a transfer being
active all the time. This seems very difficult with the current kernel
drivers. I am mainly looking at the Raspberry Pi BCM2708 SPI driver, but
I have also tried to find similar features from other drivers.

There seems to be no way to prevent the deactivation and reactivation of
the clock and everything between separate transfers - and a single
transfer is bounded in size and no progress is reported for it. Even
within a single transfer, it would seem that an earlier transfer is
waited to receive a DONE signal (tx fifo empty, rx fifo has everything)
before starting a new transfer, so there's always a small gap between
transfers. (The RPi hardware stops sending SCLK if there ever is a
condition where there is no byte ready in the FIFO to be sent, so if a
DONE signal is receved that means that SCLK has already been stopped.)

Keeping a transfer active constantly would need some buffering on writes
and reads to keep the TX FIFO always filled and RX FIFO not
full. Otherwise I don't see any direct problems with it, atleast on the
hardware level.

So, my questions are:

 1) Is there a fundamental problem in keeping an SPI transfer active for
    extended periods of time (several hours)?
 2) Is this possible with the kernel API somehow?
 3) Is this possible from userland somehow?
 4) If it is not possible, what would be a good API for such a case?
 5) Would patches for such functionality be accepted?

Thank you in advance,
-- Naked

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-10-04 21:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-27 22:09 Continuous streaming SPI transfer Nuutti Kotivuori
     [not found] ` <87zk4bazje.fsf-Nc554NfcwGrUGg1qMAD/drNAH6kLmebB@public.gmane.org>
2012-09-28  1:30   ` Ned Forrester
     [not found]     ` <5064FDB1.9060304-/d+BM93fTQY@public.gmane.org>
2012-09-29 20:20       ` Nuutti Kotivuori
     [not found]         ` <87txugbmy2.fsf-Nc554NfcwGrUGg1qMAD/drNAH6kLmebB@public.gmane.org>
2012-09-30  1:56           ` Ned Forrester
2012-10-04 21:13   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).