From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Jonathan Cameron <jic23@cam.ac.uk>
Cc: linux-iio@vger.kernel.org
Subject: More questions about IIO
Date: Thu, 10 Nov 2011 10:43:51 +0100 [thread overview]
Message-ID: <4EBB9CD7.4000408@free-electrons.com> (raw)
Hi Jonathan,
Now that the work on the AT91 adc driver using software triggers looks
well on its way to the kernel, I begin to work on hardware triggers for it.
Few questions raise though.
First, it seems that when using hardware triggers, we have to use the
iio ring buffers.
So the first implementation that comes to my mind is this one :
- The probe function actually sets up the driver, the triggers, the
buffer, etc.
- Each time an interrupt is raised, the handler either fill the buffer
with the values of the activated channels or store it in a temporary
variable just like I'm doing right now for the software triggers.
- When a user reads the sysfs file, either read from the buffer or
from the temporary variable.
But :
- Is it the right way to do so with iio ?
- Is there a way for the user to select at runtime if he wants only
software trigger or hardware trigger (if they are enabled in the kernel) ?
- What is the role of this pollfunc defined in the iio_dev struct ?
Also, the ADC has 4 external trigger sources, which are selected through
a register. 3 of them are muxed pins, so the pins available varies from
one board to another. Is there a way for the user at runtime to select
the source he wants ?
Finally, this ADC supports two resolutions : 8 and 10 bit. For now, only
10 bit resolution is supported, but the user might want to use 8 bit. Is
there a way to do so ?
Thanks,
Maxime
--
Maxime Ripard, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next reply other threads:[~2011-11-10 9:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-10 9:43 Maxime Ripard [this message]
2011-11-10 10:03 ` More questions about IIO Jonathan Cameron
2011-11-15 18:06 ` Maxime Ripard
2011-11-15 19:52 ` Jonathan Cameron
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=4EBB9CD7.4000408@free-electrons.com \
--to=maxime.ripard@free-electrons.com \
--cc=jic23@cam.ac.uk \
--cc=linux-iio@vger.kernel.org \
/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 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).