Sunday 25 August 2013

Round 6. Continuous mode the way iio wants

IIO didn't like my usage of their trigger oscilloscope style. Messed their ABI.
Soo. there is an internal trigger in the driver that occurs for every threshold.

After the changes and some cleanup.

I'm back online with round 6. hope iio likes the driver this time.

http://thread.gmane.org/gmane.linux.kernel.iio/8861

Major changes in the way driver works.

Previously i would use a sysfs trigger to trigger the start of sampling after enabling the buffer.

IIO didn't like that. And suggested that I create a driver trigger that would automatically trigger upon the FIFO threshold being reached every time.

So. I did that. It took a while to restructure the driver.

I do note one thing. Previously I would get the illusion that the adc driver is working alongside the touchscreen events.
I think I was wrong. I looked at the code, thought, and checked the irq status again and again. Only one side is active at one instant.

Which makes sense sorta. Cause the way I understand the hardware. The SW steps can happen (adc) or the HW steps can happen (TSC). So one of em has to give in.

Although, at the moment, the ADC is at max sampling frequency. Perhaps configuring the adc with a slower sampling rate might allow the TSC steps to be configured. I'm not going deep into the sampling frequency yet. it has to do with the step delay register. the way i see it. i think all the channels can have individual sampling frequencies as well.

IIO was designed with loads of flexibility in mind. but i think it was made with external adc chips in mind. not internal powerful adcs like this am335x one.

No comments:

Post a Comment