Polling ADC /sys/devices/platform/ff100000.saradc/iio:device0/in_voltage2_raw

I’m trying to poll the ADC linux device in order to detect changes in the ADC, like an interrupt.

Using linux poll detects 10 “changes” per millisecond, but the value does not change this often. It really changes 1 or 2 times per millisecond. How can I get this information only when the ADC value changes? is there another linux device file I can monitor that will work?


I have been reading about iio… the way to do this is using triggers… how can I set a trigger function to be called when new data is available on “in_voltage2_raw”?


@Frank can you help me with this?