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

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

 



Hi Matthew,

On Fri, Jul 31, 2009 at 03:26:46AM +0100, Matthew Garrett wrote:
> Devices occasionally use the keyboard controller to send hardware
> notifications that should be handled by the kernel rather than userspace.
> These can be handled in kernel by registering an input handler, but the
> event will still bubble up to userspace where it may cause confusion. This
> patch adds support for the kernel to register filters, allowing it to
> indicate that the event should be consumed by the hardware-specific driver
> rather than passed to other input handlers. The assumption is that, as this
> is hardware specific, there should be no need to have more than one filter -
> similarly, if an input device is grabbed, we assume that people know what
> they're doing and don't pass it to the filter.
> 

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.

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.

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