Re: Raw data block input: is IIO a good choice?

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

 



On 08/04/17 07:13, Pavel Roskin wrote:
> Jonah, I appreciate your advice.
> 
> I'm still considering using IIO, as I would need some ways to
> configure the hardware (set interrupt watermark, set some other
> configuration registers). But it's good to understand why the
> resulting driver would be unlike all others.
The primary reason for the existence of a subsystem is to
provide a consistent userspace interface. In some ways it doesn't
matter what goes on within the kernel at all.

Now it may be possible to do this for your device, but that would
only make sense if we were to describe the data in your ring buffer.
It could be implemented as a hardware ring buffer with no software
buffer.

Whilst we fairly recently move the sca3000 driver away from this,
as in that case an intermediate software buffer made more sense,
that driver used to do this.
Jumping back an arbitrary distance:
https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/tree/drivers/staging/iio/accel/sca3000_ring.c?h=iio-for-4.7a&id=486294f184c05cff116160bb731cbb679f047621
I believe there are drivers in analog devices out of mainline tree
that do it as well. One example there is the spi offload engine
support which uses the hardware buffer stuff, but that is somewhat
cryptic so the sca3000 driver above is probably a better starting
point.

Then we come to the question of how to describe the data. If you
don't do this of course you can use IIO out of mainline, but there
will be little interest in merging it.

If you describe the data using normal IIO channels it is up to you
whether you then use your own userspace stack or something more
general.  What we are interested in from a subsystem point of view
is ensuring you 'could' use standard userspace code.

So what is actually in this magic data dump?  Sensor data by the
sound of it, so it could be described?  Without that description
I'm not going to be keen to have it mainline IIO.

Jonathan

p.s. When replying to a thread, please keep all relevant previous
emails in there! Makes it a lot easier for those of us running
a bit behind to catch up.

> 
> Pavel
> --
> 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
> 

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