linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* More questions about IIO
@ 2011-11-10  9:43 Maxime Ripard
  2011-11-10 10:03 ` Jonathan Cameron
  0 siblings, 1 reply; 4+ messages in thread
From: Maxime Ripard @ 2011-11-10  9:43 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio

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

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

end of thread, other threads:[~2011-11-15 19:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-10  9:43 More questions about IIO Maxime Ripard
2011-11-10 10:03 ` Jonathan Cameron
2011-11-15 18:06   ` Maxime Ripard
2011-11-15 19:52     ` Jonathan Cameron

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).