iio: saradc: add support for g12a
PD#156734: iio: saradc: add support for g12a
Add period sampling mode for g12a and next, here are a brief overview:
1. Enable period sampling mode
echo 1 > /sys/bus/iio/devices/iio:device0/buffer/enable
2. Set the sampling interval
The sampling interval can be set in dts by the two params:
<1> amlogic,delay-per-tick
<2> amlogic,ticks-per-period
If there are no define the params above, and the channel list is
sampled every 1ms by default.
3. Read sampling data from buffer
this currently provides no buffer events so it is up to userspace to
work out how often to read from the buffer. therefore, if you want to
read continuous sampling data from buffer, please use application.
Eg:
[kernel]/tools/iio/iio_generic_buffer.c
Change-Id: I27f904e2736768eacc9d73ff24078bd659e37049
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>