AnsweredAssumed Answered

AD7798 Linux Driver

Question asked by peter.clerico on Jun 10, 2016
Latest reply on Jun 13, 2016 by peter.clerico

Below is input from my customer who is developing an AD7798 application - their code is creating a large time lag in the A/D conversion.  Please review and provide appropriate advice or recommendations.  If additional information is needed, please advise.


We  are currently using the ADC-AD7798 for our Linux based  application. we are  using the AD7798 in single conversion mode.but this is consuming  30 ms of time  for single conversion. we have  QT application that reads the files from /sysfs/nodes/. we need  help and example code to setup the buffer and enable the high speed interface using the LIBIIO  for AD7798.

following is our kernel configuration








initially there was no support for following IOCTLs in kernel

#define IIO_BLOCK_ALLOC_IOCTL _IOWR('i', 0xa0, struct iio_buffer_block_alloc_req)

#define IIO_BLOCK_FREE_IOCTL  _IO('i', 0xa1)

#define IIO_BLOCK_QUERY_IOCTL _IOWR('i', 0xa2, struct iio_buffer_block)

#define IIO_BLOCK_ENQUEUE_IOCTL _IOWR('i', 0xa3, struct iio_buffer_block)

#define IIO_BLOCK_DEQUEUE_IOCTL _IOWR('i', 0xa4, struct iio_buffer_block)

we have downloaded the kernel from and merged it with  our kernel . but still we  are getting following errors in  LIBIIO

"Errror in IIO_BLOCK_ALLOC_IOCTL,   Function not implemented " . this issue seems with the industrial-buffer setup based on kfifo or DMA. putting the debugs in linux kernel shows  that  there are no  access functions defined for the buffer . but there is kfifo based  buffer setup in ad_sigma_delta.c in drivers/iio/adc/ad_sigma_delta.c file which  is used by the ad7793.c in drivers/iio/adc/ad_sigma_delta.c of kernel source tree.