I am currently working on a project in which I would like to perform an SPI Transfer
of approx 500 bytes each time a GPIO_GEN_0 interrupt occurs. I have successfully
authored code in userspace using ioctl to perform a SPI transfer (as a test of the hardware)
and have also authored a kernel module which installs an Interrupt Service Routine that is called
on the positive edge of the GPIO_GEN_0 input. I now need to write some SPI transfer code in
the kernel module that handles the GPIO interrupt so that this transfer is done in an interrupt
service routine each time the GPIO_GEN_0 line is asserted. This is where the confusion comes in.
I was thinking that using DMA for SPI would be the best way to do this which lead me to the msperl
spi-bcm2835 driver. If I go to the msperl git repository and view the spi-bcm2835.c file, I see that it
is authored by Chris Boot (which appears to be the same module that is loaded if I load the spi driver
using raspi-config). I do not see any reference to DMA functions in this c source file. It would appear that
the original DMA source was writted by notro and then forked by msperl. Is this code the code that is currently
distributed as part of raspbian distro? Where are the DMA functions? Is there any sample code available to
illustrated how the SPI DMA code should be used inside a kernel module? I found this example but do not see the
functions that it uses in the msperls git repository:
viewtopic.php?&t=50893
Any help would be appreciated