From: Bill Gatliff <bgat@billgatliff.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: Synchronizing evdev readers and drivers?
Date: Fri, 3 Dec 2010 13:50:08 -0600 [thread overview]
Message-ID: <AANLkTikw3HF7CUc-7Enw-SGXztmiZAPUYZEKT1ViDTic@mail.gmail.com> (raw)
In-Reply-To: <20101203193224.GA21277@core.coreip.homeip.net>
Dmitry:
On Fri, Dec 3, 2010 at 1:32 PM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> How would the driver know if application that is opened the device
> does not want to be aware of the events that happened before read as
> opposed to the application that simply choses to "batch" events and
> process them at once? The driver might not be able to retrieve the "old"
> state of the hardware. Lets say toggle WIFI button was pressed and
> released while application wasn't reading. Normally kernel would queue
> the events and when userspace read the FD they'd see events, whereas in
> your case events would be lost.
Good question.
What I'm proposing is really useful only for embedded work, where you
have absolute control (or at least understanding) over what the
hardware and driver stack looks like. If one wanted to see all the
transitions of the WiFi button (to use your example), they'd bind the
hardware to a driver that worked that way. The system integrator
would make the choice, not the application.
In situations where an application wanted the accumulating behavior
sometimes, and the stateless behavior at other times, then the system
integrator could provide for that by using two different event
interfaces, one for each personality. I think...
> I'd say applications that really want this behavior simply need to
> go through open/read/close cycles.
Wow, that seems really, really expensive at a sampling rate of 100+Hz.
b.g.
--
Bill Gatliff
bgat@billgatliff.com
next prev parent reply other threads:[~2010-12-03 19:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-02 17:26 Synchronizing evdev readers and drivers? Bill Gatliff
2010-12-02 21:22 ` Dmitry Torokhov
2010-12-02 21:34 ` Bill Gatliff
2010-12-03 12:42 ` Mark Brown
2010-12-03 13:03 ` Bill Gatliff
2010-12-03 13:53 ` Mark Brown
2010-12-03 17:36 ` Bill Gatliff
2010-12-03 18:52 ` Mark Brown
2010-12-03 19:41 ` Bill Gatliff
2010-12-03 22:27 ` Mark Brown
2010-12-03 23:05 ` Dmitry Torokhov
2010-12-03 19:50 ` Dmitry Torokhov
2010-12-03 20:17 ` Bill Gatliff
2010-12-03 21:24 ` Dmitry Torokhov
2010-12-03 19:32 ` Dmitry Torokhov
2010-12-03 19:50 ` Bill Gatliff [this message]
2010-12-03 20:56 ` Dmitry Torokhov
2010-12-04 17:52 ` Jonathan Cameron
2010-12-04 18:15 ` Bill Gatliff
2010-12-04 17:46 ` 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=AANLkTikw3HF7CUc-7Enw-SGXztmiZAPUYZEKT1ViDTic@mail.gmail.com \
--to=bgat@billgatliff.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@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).