public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>,
	linux-acpi@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: [PATCH 1/2] input: Add support for filtering input events
Date: Thu, 6 Aug 2009 09:49:10 -0300	[thread overview]
Message-ID: <20090806124910.GA15867@khazad-dum.debian.net> (raw)
In-Reply-To: <20090805044923.6AE71526EA5@mailhub.coreip.homeip.net>

On Tue, 04 Aug 2009, Dmitry Torokhov wrote:
> On Tue, Aug 04, 2009 at 11:01:58AM +0100, Matthew Garrett wrote:
> > On Mon, Aug 03, 2009 at 10:04:51AM -0700, Dmitry Torokhov wrote:
> > > I don't think this is the proper layer to do the filtering, the filter
> > > should be done in i8042, not input core. The way you done it would kill
> > > any possibility of user assigning KEY_WLAN to a spare key on his or her
> > > keyboard and using it to control wireless cards that are not hardwired.
> > 
> > Ok, that seems fine.
> > 
> > > I would accept the patch that would add a filter in the form
> > > 
> > > 	bool (*i8042_fillter)(unsigned char data, unsigned int flags,
> > > 			struct serio *port);
> > > 
> > > I don't think we'd need to chain them into a list or something, one hook
> > > should be enough since I don't expect we'll have several platform
> > > drivers loaded on one box.
> > 
> > So filter on the raw i8042 data rather than after any processing? 
> > Wouldn't this require some level of state machine in the driver using 
> > this functionality?
> 
> Yes, but it should not be too complex - with laptops you can be pretty
> much sure keyboard is in translated set 2 mode.

But don't we have a crapload of implementation weirdness work-arounds in the
i8042 drivers, including some for problems with the raw protocol itself?  We
wouldn't want to duplicate THAT...  will the filter be placed somewhere that
doesn't have to deal with that kind of bogosity?

With laptops, you can be sure that 99% of the time, the i8042 is just
firmware running inside the EC, and subject to a LOT MORE bugs and
incompetence than an emulated i8042 inside the chipset would be...

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

  reply	other threads:[~2009-08-06 12:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-31  2:26 [PATCH 1/2] input: Add support for filtering input events Matthew Garrett
2009-07-31  2:26 ` [PATCH 2/2] dell-laptop: Trigger rfkill updates on wifi toggle switch press Matthew Garrett
2009-08-03 17:04 ` [PATCH 1/2] input: Add support for filtering input events Dmitry Torokhov
2009-08-04 10:01   ` Matthew Garrett
2009-08-05  4:49     ` Dmitry Torokhov
2009-08-06 12:49       ` Henrique de Moraes Holschuh [this message]
2009-08-06 14:48         ` Dmitry Torokhov
2009-08-06 19:18           ` Henrique de Moraes Holschuh

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=20090806124910.GA15867@khazad-dum.debian.net \
    --to=hmh@hmh.eng.br \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=mjg59@srcf.ucam.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