I'm building a project using the MCP3914 8-channel analog front end (ie ADC) device connected to the Raspberry Pi's SPI peripheral.
The device has a continuous read mode where you request the value of one register then hold the CS low and it cycles through all of the registers, transmitting the value of each one, for as long as you hold CS low. I'd like to use this mode to continuously sample the values sampled by the ADC. Ideally, the transfer should be done with DMA, to keep CPU utilisation low. The SPI peripheral could write data into a circular buffer with the userspace either keeping up or losing data if it doesn't read it in time, or it could perhaps write to two buffers, passing each to a userspace program when it fills up and then switching to the other.
What are my options for implementing this? It looks like the spidev driver doesn't support reading more than about 4k from the device (1 page?). Also the documentation here points to a github project for DMA-enabled SPI, but the wiki for that project says that mainline now has DMA capability, with a link to the driver source code. So how do we do SPI DMA with the spidev driver on modern kernels?
Assuming that I can't use the spidev driver, I guess I'm stuck using the bcm2835 library to manipulate the peripheral directly. I don't know a lot about this - not even if it's going to be in user space or kernel space.
Can someone give (or point me to) some advice please?