SPI Slave with handshaking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I'm trying to port the OPLC XO 1.75 Embedded Controler (EC) driver to the SPI 
slave framework. The EC is a SPI master that uses an extra pair of handshake
signals to determine when is it safe to transmit. The original driver [1]
included the SPI slave driver.

[1] http://dev.laptop.org/git/olpc-kernel/tree/drivers/misc/olpc-ec-1-75.c?h=arm-3.0-wip

To send the command to the EC, the protocol requires me to [2] signal to the 
master that the tx FIFO is filled and it can start the transaction. The problem
is that I have no idea when that is. I'm wondering what my options are?

[2] http://wiki.laptop.org/go/XO_1.75_HOST_to_EC_Protocol

1.) Add a ready() callback to the spi_message, that would fire after the tx 
    FIFO has been filled?

2.) Delay the ACK strobe a bit after spi_async() and just hope for the best
    (Eek)

3.) Have the transfer with NULL rx_buf complete just after sending the data to 
    the controller, not waiting for actual transfer. And then strobe the ACK.

4.) Keep the SPI slave code in the EC driver. I suppose this wouldn't be
    acceptable?

Better ideas, opinions & advice appreciated!

Thanks
Lubo




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux