On Lu, 2019-01-21 at 16:20 -0500, Crash House wrote: > Hello everyone, > > (Never done this before, let me know if I do anything incorrectly). > > I am looking for a dummy example on using the iio/buffer-dmaengine > > I have found several SDR examples in the linux/driver/iio/adc. However > I am struggling to implement a simple version of them myself. > > The main road block I have currently seems to be a different between > the AnalogDevicesInc github project and Torvalds. Specifically the > difference is in “linux/include/linux/iio/buffer-dmaengine.h”. One > takes 2 arguments and the other 4. > > Along with this when attempting to add a module that uses dmaEngine I > get the following dmesg: “Unknown symbol iio_dmaengine_buffer_alloc” > > Am I missing something stupid? > Am I using an obsolete functionality? > Should I be using iio/kfifo_buf.h? > > Thanks everyone, > > John Hello John, Here's an example which uses the buffer-dmaengine, which is as simple as it gets: https://github.com/analogdevicesinc/linux/blob/master/drivers/iio/adc /ad7768.c. Unfortunately, it's not upstream, mainly for the reasons you have pointed out above. There is a difference between the Analog Devices buffer- dmaengine and the upstream version. I hope this helps. -Stefan