Re: [PATCH 1/2] input: Add support for filtering input events

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

 



On Aug 6, 2009, at 5:49 AM, Henrique de Moraes Holschuh <hmh@xxxxxxxxxx> wrote:

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

There actually not many quirks there, once we identified all ports on i8042; mostly we need to deal with keys not sending release events.

will the filter be placed somewhere that
doesn't have to deal with that kind of bogosity?

The problem with doing this on input core level is that we don't always even have a keycode, nor do we want one. For example my d630 sends some crap through keyboard serio port when it is unhappy with power adapter...

--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux