beagleboard / kernel

Kernel for the beagleboard.org boards
172 stars 159 forks source link

Add continuous sampling via /dev/iio to ADC #49

Closed ZubairLK closed 11 years ago

ZubairLK commented 11 years ago

Update. I've updated my repo too. It should merge. And I added some checkpatch.pl fixes as well.

This adds a bunch of patches to the adc patchset enabling continous sampling mode. A large buffer of data can now be read via /dev/iio entries

The work is forward ported from the Arago tree. The original author is Rachil Patna.

Some of his patches might seem missing from Arago but that is because

1) I incorporated some of his minor bugfixes in the same large main patch. 2) Some of the patches have already been incorporated in the patchset in mfd-next.

The rest of the small bug fixes by Russ Dill are kept in separate patches.

All in all. This brings all the functionality of the ADC driver in the Arago tree to the BBB.

evtest for touchscreen does register events too

ZubairLK commented 11 years ago

Why can't it be automatically merged? :s

Want me to update/pull and then send another pull request?

RobertCNelson commented 11 years ago

The "github.com" bot it telling you 'that' since koen recently merged in more cape stuff into 3.11...

ZubairLK commented 11 years ago

I've updated my repo and pushed the changes. I think it'll merge now.

ZubairLK commented 11 years ago

Oops. I hope I'm not embarrassing myself and emails aren't going everywhere :p

eliasbakken commented 11 years ago

I've tried to pull the latest patch set, but somehow the bone-iio-helper driver is loaded before the tiadc driver, so the channels have not been posted to the bus yet: ... [ 0.443982] bone-iio-helper thermistors.10: Could not get AIN0 analog input ... [ 0.561518] tiadc tiadc: channels=8 [ 0.562350] tiadc tiadc: loaded OK ...

Any thoughts?

On Sun, Jul 14, 2013 at 8:07 PM, ZubairLK notifications@github.com wrote:

Oops. I hope I'm not embarrassing myself and emails aren't going everywhere :p

— Reply to this email directly or view it on GitHubhttps://github.com/beagleboard/kernel/pull/49#issuecomment-20940673 .

Vennlig hilsen Elias

ZubairLK commented 11 years ago

bone-iio-helper is not needed anymore. It was a workaround only as the actual driver wasn't working. The helper accesses functions that wont work in 3.11. I did patch 3.8 so that the helper worked as well. but not 3.11

going directly to /sys/bus/iio/devices/iio:deviceX/ you'll find all values there once the DT is enabled properly.

Also. DT has changed slightly. for 3.11, i add the following directly to the boneblack.dts file.

&tscadc { status = "okay";

tsc { ti,wires = ; ti,x-plate-resistance = ; ti,coordiante-readouts = ; ti,wire-config = ; };

adc { ti,adc-channels = < 4 5 6 7 >; };

};

p.s. the name changes to TI-am335x-adc in 3.11 too.

eliasbakken commented 11 years ago

Ah, looks very good!

On Sun, Jul 14, 2013 at 9:22 PM, ZubairLK notifications@github.com wrote:

bone-iio-helper is not needed anymore. It was a workaround only as the actual driver wasn't working. The helper accesses functions that wont work in 3.11. I did patch 3.8 so that the helper worked as well.

going directly to /sys/bus/iio/devices/iio:deviceX/ you'll find all values there once the DT is enabled properly.

Also. DT has changed slightly. for 3.11, i add the following directly to the boneblack.dts file.

&tscadc { status = "okay";

tsc { ti,wires = ; ti,x-plate-resistance = ; ti,coordiante-readouts = ; ti,wire-config = ; };

adc { ti,adc-channels = ; };

};

p.s. the name changes to TI-am335x-adc in 3.11 too.

— Reply to this email directly or view it on GitHubhttps://github.com/beagleboard/kernel/pull/49#issuecomment-20941929 .

Vennlig hilsen Elias

koenkooi commented 11 years ago

Can you redo the commit so it only has the changes on the patches/adc directory?

ZubairLK commented 11 years ago

That's what it was until I attempted to 'fix' things. Lol.

I'll do a clean repo + commit + pull request when I get back home.

Just close this one. On Jul 15, 2013 9:08 AM, "Koen Kooi" notifications@github.com wrote:

Can you redo the commit so it only has the changes on the patches/adc directory?

— Reply to this email directly or view it on GitHubhttps://github.com/beagleboard/kernel/pull/49#issuecomment-20956289 .