Re: Problems with using IIO buffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

> >> I am having troubles getting buffers to work with IIO. Querying raw
> >> data from devices works well via sysfs, but buffered input from ADCs
> >> does not work.
> >
> > how do you setup the buffer from userspace? see e.g.
> > http://events.linuxfoundation.org/sites/events/files/slides/lceu15_baluta.pdf,
> > page 21
> 
> I used what iio_readdev does, but setting up the buffer manually on
> sysfs (using a sysfs trigger as current_trigger), I get
> "echo: write error: Invalid argument" when trying to enable the buffer
> (writing 1 to buffer/enable).
> 
> I tried this on the iio_dummy module, enabling the in_voltage0 channel.

this is what I use (Ubuntu, Linux 4.4) and it works; maybe the trigger 
name you use is incorrect?

modprobe iio_trig_sysfs
modprobe iio_dummy (make sure CONFIG_IIO_SIMPLE_DUMMY_BUFFER is #defined)
cd /sys/bus/iio/devices/iio_sysfs_trigger
echo 123 > add_trigger
cd /sys/bus/iio/devices/trigger0
cat name # should give sysfstrig123
cd /sys/bus/iio/devices/iio:device0
echo sysfstrig123 > trigger/current_trigger
echo 1 > scan_elements/in_voltage0_en
echo 1 > buffer/enable

regards, p.

-- 

Peter Meerwald-Stadler
+43-664-2444418 (mobile)
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux