From: Jonathan Cameron <jic23@kernel.org>
To: Alessandro Osima <alex.osima@gmail.com>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
Hunyue Yau <hy-gsoc@hy-research.com>
Subject: Re: Abstracting and extending evdev to work with the iio subsystem
Date: Sat, 11 May 2013 15:18:33 +0100 [thread overview]
Message-ID: <518E5339.3090006@kernel.org> (raw)
In-Reply-To: <62B3B14C-0FFA-4914-9CD0-B4D5742780C7@gmail.com>
Hi Alessandro,
Note that we do have the ability (though the driver hasn't merged yet
mainly because I got distracted) to have a fully fledged input driver
running as a client of IIO.
Also a lot of what you are focusing on in your description seems to be that
IIO uses sysfs to provide access to the various data channels on a device.
Note that is only one option so please take a close
look at the buffered methods as they are much closer to evdev but with
rather less overhead. In fact early discussions that lead to IIO
focused on the fact that for high performance we would want to loose
the overhead of labeling every event.
As it is we have one dev file per iio device - though events are accessed
via an anonymous file descriptor obtained from the buffer access file that
sits under /dev (note there was quite a lot of pressure to not have multiple
files in dev for a single physical device).
The sysfs stuff then acts as a description of what is coming out
of the device (to take it out of band and hence loose the overhead of
constantly describing the data). Now I agree there are plenty
of usecases where evdev type interfaces make sense - such as actual
events (rather than consistent data streams). Whether it makes sense
from a userspace point of view to have a generalized ev dev or instead
a means of making relevant devices run through input is not clear to me.
Now the IIO event interface (not used for the primary data flow) is
clunky (and loosely based on evdev) so there may be more scope there.
Note however that as things stand IIO events do not carry data. They
merely indicate events like a threshold being crossed. This is again
rather different from typical evdev usage. (it's been a while since
I last looked at evdev so I may have missremembered some of the details!)
So I'd favour some work on the events side of IIO and how that could
make use of a generalized evdev but am unsure of whether evdev would make
sense for more general IIO usage. If you do want to do that you'll want
to use a very similar approach to the iio-input driver to get access to the
main data flow and come up with something similar for what are termed
'events' in IIO (threshold type interrupts sources).
Good luck
Jonathan
On 05/06/2013 11:47 PM, Alessandro Osima wrote:
> Hello Lars.
>
> Thank you for your interest and sorry for the late answer.
>
> When I posted the proposal I was still studying the event interface, so I decided not to add it as a possible use case yet.
> I believe an input abstracted evdev would allow the creation of a more flexible and simpler to use event interface.
> Every event generated by a device could be broadcasted trough a single file in /dev (created by the abstracted evdev) and read by an application with the help of an header file describing the new event interface (like input currently does with evdev and input.h).
> This approach will allow to have an event interface that's simpler to use for an userspace app because instead of reading N sysfs files concurrently the app will have to read just one file in /dev and then handle the events received with something like a switch statement.
> Input abstracted evdev will help by creating the /dev file and forwarding the file_operations on that file to iio.
> I have added a bit more detailed explanations on my proposal.
>
> This is just an idea, I'm looking for your feedbacks to make it better.
>
> Regards,
> Alessandro Osima
>
> On May 3, 2013, at 9:50 AM, Lars-Peter Clausen <lars@metafoo.de> wrote:
>
>> On 04/30/2013 04:24 AM, alessandro osima wrote:
>>> Hello everyone, my name is Alessandro Osima and I'm a computer
>>> science student at Università degli Studi di Milano, Italy (second
>>> year, equivalent to bachelor).
>>>
>>>
>>> For this year's Google Summer of Code I have decided to submit an
>>> application proposal focused on abstracting evdev from input to allow
>>> iio and other subsystems to take advantage of it to send/receive
>>> events and data to userspace application troughout files located in
>>> the /dev directory.
>>>
>>> This http://www.google-melange.com/gsoc/proposal/review/google/gsoc2013/asion/1#
>>> is my proposal.
>>>
>>> I would kindly ask your opinions about this project and would be very
>>> grateful for any comments and suggestion to improve it.
>>>
>>
>> Hi,
>>
>> Sounds interesting. Did you hd a look at the existing IIO event interface
>> (drivers/iio/industrialio-event.c)? I'm asking because you don't seem to
>> mention it in your proposal.
>>
>> - Lars
>
> --
> 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:[~2013-05-11 14:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-30 2:24 Abstracting and extending evdev to work with the iio subsystem alessandro osima
2013-05-03 7:50 ` Lars-Peter Clausen
2013-05-06 22:47 ` Alessandro Osima
2013-05-11 14:18 ` Jonathan Cameron [this message]
2013-05-20 1:27 ` Alessandro Osima
2013-05-20 10:37 ` Jonathan Cameron
2013-05-21 23:28 ` Alessandro Osima
2013-05-22 8:06 ` 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=518E5339.3090006@kernel.org \
--to=jic23@kernel.org \
--cc=alex.osima@gmail.com \
--cc=hy-gsoc@hy-research.com \
--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 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.