AnsweredAssumed Answered

SPI Device driver programming

Question asked by vijesh reddy on Aug 24, 2017
Latest reply on Oct 26, 2017 by Carlos_Musich

Hi ,

I have interfaced a 24bit ADC(sampling rate 52ksps) to phycore imx6 module via SPI. I have created a node in /dev - SPIDEV1.0. I have  written an spi driver in user space and reading the ADC using read() function.


I am able to read the adc, but since the driver was written in user space - read() function is taking a lot of time and  the samples are getting missed. I was advised to write the driver in kernel space instead of user space to resolve this issue.


I am new to linux and has no idea on device drivers.

My basic doubt is to know whether it is possible to read the ADC by writing my own device driver. Is it possible to do all buffering in kernel space and send it later to user space once all the samples are collected.


Please help me out, thanks in advance