AnsweredAssumed Answered

Convert/wrap char driver to utilize IIO and LibIIO

Question asked by KevinC on Dec 5, 2016
Latest reply on Dec 13, 2016 by larsc

Hello,

 

I currently have a design that utilizes an array of many AD7621's that implement a phased array sensor.  The design uses FPGAs to aggregate all the samples from the ADCs to a central FPGA that is connected to a PC via PCIe.  There is some signal processing/downsampling prior to transfer of the data to SW.  We have a IP core and linux driver solution that implements a simple FIFO interface on the FPGA side and a char device that you can fopen, fread, etc on the SW side.  Do an fread on the dev file after you open it and out comes a stream of ADC channels multiplexed 1-N from the FPGA. 

 

So like many who do this type of thing we are sick of writing/maintaining visualization tools, network backends, etc to move the data around and analyze it.  We would like to use libiio in the future for these needs. My understanding is that the IIO kernel framework has 2 interfaces, one being for the most part a chardev interface.  If we have a driver that implements the standard file_operations structure and prototypes how much work are we talking to stitch it into the IIO subsystem instead (probably showing my linux kernel ignorance here..).  My hope is that we could for the most part wrap the current driver, which is generic and does not describe/know about the sensor or it's characteristics, with an iio driver on top that would then provide that description as well as compatibility with libiio in userspace. 

 

Thanks for any insights, pointers, or references you can provide,

 

Kevin

Outcomes