I’m designing a SPI Slave driver of Linux kernel 2.6.35 on i.MX28 platform.
I know that Linux does not support only Master mode! So the application code starts with spi_ioc_transfer ioctl.
But, the CPU (i.MX285) can support Slave function.
Is there anyone can help me or example?
Thanks.
Hi yongki
please try attached patch.
Best regards
chip
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
HI igorpadykov would please tell me how to use the patch file ? What files and softwares must I have first.
That patch file have some help to me for understanding Slave settings.
But, I still have a question about a settings (settings are start User application area). In case Master driver, User area application open a device (ex spidev1.0) and then use ioctl (mode settings, bit settings) and finally ioctl message to exchange data on MISO pin.
My question is how to open a Slave driver of CPU in User application.
Sencond question is how to share or notify of Rx data to User applicatoin on MOSI pin at Slave driver side.
I think register the Rx FIFO hander using a request_irq at in probe function at boot time.
And then User application area will open a device (spidev1.0) to Slave driver. At this time I have a question how ?
Thanks.
Hi yongki
you can start with
ltib/..linux/Documentation/spi
Best regards
chip