2009-04-18 05:08:01     delay between several spi_write()

Document created by Aaronwu Employee on Aug 15, 2013
Version 1Show Document
  • View in full screen mode

2009-04-18 05:08:01     delay between several spi_write()

Sergey Kuznetsov (RUSSIAN FEDERATION)

Message: 72818   

 

Hi All!

 

In my spi driver I use spi framework as shown here http://docs.blackfin.uclinux.org/doku.php?id=spi.

 

I do 2 spi_write() of 5 bytes. But I have 4ms delay between serial writes. I`ve found somewhere here that it is because of an spi scheduler. The question is can I change tht number? It would be great If I don`t have a delay at all(I mean the minimum kernel can give).

 

Thank you.

 

Sergey

QuoteReplyEditDelete

 

 

2009-04-20 01:54:58     Re: delay between several spi_write()

Mike Frysinger (UNITED STATES)

Message: 72835   

 

no, there is no way for you to control that delay.  if you need the writes to happen back to back, then add multiple transfers to a message list and then use spi_sync().

QuoteReplyEditDelete

 

 

2009-04-20 02:21:59     Re: delay between several spi_write()

Sergey Kuznetsov (RUSSIAN FEDERATION)

Message: 72839   

 

Thank you, Mike!

QuoteReplyEditDelete

 

 

2009-04-20 07:30:21     Re: delay between several spi_write()

Sergey Kuznetsov (RUSSIAN FEDERATION)

Message: 72864   

 

Mike, I have another question if possible.

 

Is there any spi driver, which doesn`t use workqueue and other? Or I need to write my own, working like mmc_spi(I mean without that kind of delays)?

 

Thanks in advance,

 

Sergey.

QuoteReplyEditDelete

 

 

2009-04-20 10:05:17     Re: delay between several spi_write()

Mike Frysinger (UNITED STATES)

Message: 72884   

 

there are plenty of SPI client drivers that dont use workqueues.  they do read/writes based entirely on what userspace has asked for.

QuoteReplyEditDelete

 

 

2009-04-21 02:50:18     Re: delay between several spi_write()

Sergey Kuznetsov (RUSSIAN FEDERATION)

Message: 72923   

 

Thank you, I`ll search for them!

QuoteReplyEditDelete

 

 

2009-05-15 04:09:10     Re: delay between several spi_write()

Sergey Kuznetsov (RUSSIAN FEDERATION)

Message: 74092   

 

Hi All,

 

looking again at the spi_bfin5xx driver, since the last post, I found out that neither daemon, nor any interrupt-based event will cause consequent write come very closely since spi_sync has call to kernel scheduler(as posted previously).I tried using tickless, 1000HZ(which didn`t work), but anyway this was not the right solution.

 

I tried to run the code, sent to scheduler, by interrupt, not by the scheduler. That code include functions like write_CTRL(), read_RDBR(). But I didn`t find completely any source of it anywhere. Could you tell just where to look at?

 

And if possible, any name of a kernel spi driver without workqueues...

 

Thank you once again!

QuoteReplyEditDelete

 

 

2009-05-15 08:18:49     Re: delay between several spi_write()

Sergey Kuznetsov (RUSSIAN FEDERATION)

Message: 74105   

 

Hi All,

 

looking again at the spi_bfin5xx driver, since the last post, I found out that neither daemon, nor any interrupt-based event will cause consequent write come very closely since spi_sync has call to kernel scheduler(as posted previously).I tried using tickless, 1000HZ(which didn`t work), but anyway this was not the right solution.

 

I tried to run the code, sent to scheduler, by interrupt, not by the scheduler. That code include functions like write_CTRL(), read_RDBR(). But I didn`t find completely any source of it anywhere. Could you tell just where to look at?

 

And if possible, any name of a kernel spi driver without workqueues...

 

Thank you once again!

 

---

 

My fault, I found out, I`ll try using bfin_write16 and etc. to get direct access to hardware.

 

Anyway, If there is a driver one can easily mention please tell.

 

Thank you.

Attachments

    Outcomes