linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* iio_simple_dummy_buffer_dma
@ 2016-02-22  4:41 John Syne
  2016-02-22  4:51 ` iio_simple_dummy_buffer_dma John Syne
  2016-02-22  8:07 ` iio_simple_dummy_buffer_dma Daniel Baluta
  0 siblings, 2 replies; 16+ messages in thread
From: John Syne @ 2016-02-22  4:41 UTC (permalink / raw)
  To: linux-iio

Hi,

I am interested in using the IIO DMA framework and tried to use your dummy driver. 

I attempting to get the iio_dummy working with dma and seem to be having sum difficulty.

Here is what I have done so far:

I’m working on a BeagleBoneBlack running a 4.1 Linux Kernel. I have back ported the latest IIO code from git://git.kernel.org/pub/scm/linux/kernel/git/jic23

As a test I tried ti_am335x_adc.ko and enabled in_voltage0_en and then enabled the buffer. Reading from /dev/iio:device0 provided the waveform of the signal generator I had connected to ADC0 on the board. I was even able to run iiod and then connected IIO Oscilloscope which showed the same waveform. I did get a message WARNING: High-speed mode not enabled, but I guess there is no mmap in the driver and that is probably the issue.

In linux config, I have enabled the following:
CONFIG_IIO_SIMPLE_DUMMY_EVENTS
CONFIG_IIO_SIMPLE_DUMMY_BUFFER
CONFIG_IIO_SIMPLE_DUMMY_BUFFER_DMA
CONFIG_IIO_BUFFER_CB
CONFIG_IIO_BUFFER_DMA
CONFIG_IIO_BUFFER_DMAENGINE
CONFIG_IIO_KFIFO_BUF
CONFIG_IIO_TRIGGERED_BUFFER
CONFIG_IIO_TRIGGER
CONFIG_IIO_CONSUMERS_PER_TRIGGER 2

When I "modprobe iio_dummy”, the following modules are loaded:

industrialio
industrialio_buffer_dma
iio_dummy
kfifo_buf
iio_dummy_evgen

I then modprobe iio_trig_sysfs which gives me /sys/bus/iio/device/iio_sysfs_trigger. To create a trigger I did:

> echo 1 > /sys/bus/iio/device/iio_sysfs_trigger/add_trigger
> cat name /sys/bus/iio/device/trigger0/name
> sysfstrig1
> echo sysfstrig1 > /sys/bus/iio/device/iio:device0/trigger/current_trigger

Now to enable a measurement:

> echo 1 > /sys/bus/iio/device/iio:device0/scan_elements/in_voltage0_en

Finally to enable the buffer:

> echo 1 /sys/bus/iio/device/iio:device0/buffer/enable

When I read "/dev/iio:device0" I get nothing. Connecting IIO Oscilloscope I get the following error message:

WARNING: High-speed mode not enabled
ERROR: Reading from device failed: -110
Client Exited

In iio_simple_dummy_buffer_dma.c, I see iio_dummy_dma_source which generates a rect, sine, tri and saw waveforms. Not sure what I need to do to get these waveforms to generate. Is this demo functional?


Regards,
John





^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-03-30 15:45 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-22  4:41 iio_simple_dummy_buffer_dma John Syne
2016-02-22  4:51 ` iio_simple_dummy_buffer_dma John Syne
2016-02-22  4:57   ` iio_simple_dummy_buffer_dma John Syne
2016-02-22  7:34     ` iio_simple_dummy_buffer_dma John Syne
2016-02-22  7:43       ` iio_simple_dummy_buffer_dma John Syne
2016-02-22  7:52         ` iio_simple_dummy_buffer_dma John Syne
2016-02-22 11:44   ` iio_simple_dummy_buffer_dma Lars-Peter Clausen
     [not found]     ` <5343A235-F2C0-46B0-A0E1-853F3BC5F27D@gmail.com>
2016-02-22 17:31       ` iio_simple_dummy_buffer_dma Lars-Peter Clausen
2016-02-23 12:58         ` iio_simple_dummy_buffer_dma John Syne
2016-02-23 16:19         ` iio_simple_dummy_buffer_dma John Syne
2016-02-23 16:33           ` iio_simple_dummy_buffer_dma Lars-Peter Clausen
2016-03-30  6:08             ` iio_simple_dummy_buffer_dma John Syne
2016-03-30 15:26               ` iio_simple_dummy_buffer_dma Lars-Peter Clausen
2016-02-23  7:24     ` iio_simple_dummy_buffer_dma John Syne
2016-02-22  8:07 ` iio_simple_dummy_buffer_dma Daniel Baluta
2016-02-22  8:14   ` iio_simple_dummy_buffer_dma John Syne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).