From: Jonathan Cameron <jic23@kernel.org>
To: Matthias Klumpp <matthias@tenstral.net>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: linux-iio@vger.kernel.org
Subject: Re: Problems with using IIO buffers
Date: Fri, 30 Dec 2016 18:34:41 +0000 [thread overview]
Message-ID: <fa3259c5-d76b-bc93-e517-054ef249a861@kernel.org> (raw)
In-Reply-To: <CAKNHny9M4uQvk_Xg1f0JL5Ob=PzUBFi8=0G1XVwqdkhR1f4P=g@mail.gmail.com>
On 20/12/16 16:49, Matthias Klumpp wrote:
> 2016-12-20 17:30 GMT+01:00 Peter Meerwald-Stadler <pmeerw@pmeerw.net>:
>> [...]
>>
>> 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
>
> This works now, I think I messed up setting the trigger last time
> (selected the wrong name, stupid...).
> I now trigger the trigger via `echo 1 > trigger0/trigger_now` and try
> to read data from the character device via
> `iio_readdev /dev/iio:device0`, with the same result as described in
> the first post - refilling the buffer doesn't work and I run into a
> timeout.
> When trying this with my driver, I see that the data polling function
> is not called, and when (using the dummy driver) trying to get data
> from the /dev/iio:device0 device without using iio_readdev, I also get
> no result.
>
> Clearly, it feels like I am missing something obvious here...
Just to check.
Triggering is per 'scan'. It's perhaps closer to the trigger on a camera
that than on an oscilloscope if that helps.
Are you firing the trigger multiple times?
It sounds like you are refilling the buffer in your driver so possibly
we are looking at different problems in the two cases?
Perhaps post an RFC of your driver for us to take a look at?
Let us know if you got this sorted. I've been rather snowed under and
out of touch for the last few weeks!
Jonathan
>
> Regards,
> Matthias
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2016-12-30 18:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-20 10:18 Problems with using IIO buffers Matthias Klumpp
2016-12-20 10:46 ` Peter Meerwald-Stadler
[not found] ` <CAKNHny_yV-FV9smGfrX2wR-T7M5uCk9WWG4xNGBMXrAuwVy2ZA@mail.gmail.com>
2016-12-20 16:30 ` Peter Meerwald-Stadler
2016-12-20 16:49 ` Matthias Klumpp
2016-12-30 18:34 ` Jonathan Cameron [this message]
2017-01-09 1:59 ` Matthias Klumpp
2017-01-10 13:29 ` Matthias Klumpp
2017-01-10 14:18 ` jic23
-- strict thread matches above, loose matches on Subject: below --
2017-01-27 18:53 Mani Sadhasivam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fa3259c5-d76b-bc93-e517-054ef249a861@kernel.org \
--to=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=matthias@tenstral.net \
--cc=pmeerw@pmeerw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.