DMA buffer access inside an IIO driver

Hi,

I am using an AD9467 ADC with some DSP inside the PL part of a Zynq 7020. I have two DMA controllers feeding into the DDR and beeing read using libiio over Ethernet on another machine. For one of the channels I am using a custom IIO kernel driver to fake a ADC device and read the second DMA channel (as it is only a single ADC but two data streams). Now I would like to access the DMA buffer content of the first channel and derive a (low speed) value from the buffer and present this as a separate channel in the iio device. My approach would be to use a modified AD9467 kernel driver but to me it is not clear how to do this in a clean way. Do you have any suggestions?

If I understand it correctly the submit method defined in the iio_dma_buffer_ops could be used to access the buffer content before it is pushed to the queue again. Would it be possible to register a separate consumer?

Thanks!

Oliver