Mxs-lradc driver development status/progress

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Mxs-lradc driver development status/progress

Jump to solution
2,226 Views
DennyvanLeersum
Contributor II

Hi,

At the moment I am running the mainline linux kernel 3.8 on some of our i.mx28 based boards. On one board we use the iio driver in staging to read some analog values from the lradc controller through the triggered buffer interface.

For another board with a touchscreen connected to the lradc we decided to upgrade to the latest 3.10 kernel for better support. The touchscreen works fine, but I am having trouble reading adc values from the other channels.

I have made a little progress and can now read the values from the adc out of the sysfs (raw mode) whith the touchscreen functioning, however the interrupt based trigger interface seems broken.

Has anyone else succeeded or tried using the touchscreen combined with reading other channels (irq based) with the driver in 3.9+ kernels?

Quite a few things changed recently so it seems that this driver is under developement. Can anyone point me to where I can find the latest patches/commits to this part of the kernel? I would also like to get in touch with the current developer(s) to know what's happening before I start adding/changing things which are there or aren't broken (anymore?).

Thanks,

Denny van Leersum

Tags (1)
1 Solution
1,067 Views
OtavioSalvador
Senior Contributor II

It is a known issue; there are two commits which need to be cherry-pick to 3.10 kernel to fix this:

If you apply those two, it should work just fine. I think they'll go eventually to 3.10.x tree after they're merged in 3.11.

View solution in original post

5 Replies
1,068 Views
OtavioSalvador
Senior Contributor II

It is a known issue; there are two commits which need to be cherry-pick to 3.10 kernel to fix this:

If you apply those two, it should work just fine. I think they'll go eventually to 3.10.x tree after they're merged in 3.11.

1,067 Views
x10
Contributor V

Hi, Otavio Salvador

I have updated mxs_lradc.c in Linux-3.9.7 with those two commits. The normal AD channels are working, and I can see their value with system command #cat in_temp9_raw etc. My question is how to read those values in my program. Are there any example code available? Thanks

BR

Cheng Shi

emtronix

0 Kudos
1,067 Views
OtavioSalvador
Senior Contributor II

You can do it using 'open' and 'read' calls or through shell script. Your call.

0 Kudos
1,067 Views
DennyvanLeersum
Contributor II

The second patch you suggested seems to be commited to the first repo you listed right after you posted.

I decided to use the entire file from that commit and go from there. The read_raw works the way it should 'out of the box' now, the trigger not quite yet.

Is the best step now to swap to the entire kernel from there and start there? I see some nice features that are planned to be added which I might like to use in the future so I'll use that repo to keep track of the progress. Is this forum the correct place to ask questions / report bugs for me?

The original questions I asked have been fully answered, so I'll mark the post as such. Thank you very much!

0 Kudos
1,067 Views
DennyvanLeersum
Contributor II

Thanks, i'll try those patches and post the results today.

0 Kudos