Hi everyone,
I want to do a simple read on the lradc pins on the mx28evk. I have read a lot of threads but I could not find the answer to my question or could wrap my head around what I'm missing there.
- In the kernel menuconfig, I have "Low Resolution ADC support" checked, which set CONFIG_MXS_LRADC=y.
- In the target filesystem, I have some files related to lradc:
/sys/devices/platform/mxs-lradc.0
/sys/devices/system/mxs-lradc
/sys/devices/system/mxs-lradc/mxs-lradc-1
/sys/bus/platform/devices/mxs-lradc.0
/sys/bus/platform/drivers/mxs-lradc
/sys/bus/platform/drivers/mxs-lradc/mxs-lradc.0
- I have one dev related to that: /dev/input/ts0
Now, can I, in the filesystem, read the ADCs?
If not, should I do a simple program that use ioctl of a driver? Which driver file?
Regards,
Jerome
Solved! Go to Solution.
Hi
I have found adc test code on the following thread.
https://community.freescale.com/message/313683#313683
Regards
Pt
Hi
I have found adc test code on the following thread.
https://community.freescale.com/message/313683#313683
Regards
Pt
Thanks everyone for your answers. I think I'll go with the register access way like suggested by Pt. I already have a section in my code where I rewrite the PINMUX registers so I'll just do the same for the ADC.
On a 3.17 kernel you can read the ADC by doing:
root@freescale /$ cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw |
4095
Hi,
There is no driver of ADC in user space. But you can use as reference the touchscreen driver source code to develop your own ADC driver in user space.
If you want to check the touchscreen funcionality in user space you can type:
cat /dev/input/touchscreen0
It seems that there is customer's example at
Best Regards,
Alejandro