Re: [PATCH] input: generic driver for slide switches

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

 



Hello Dimitry,

On Wednesday 16 March 2011 07:36:18 Dmitry Torokhov wrote:
> On Tue, Mar 15, 2011 at 02:13:49PM +0100, Alexander Stein wrote:
> > On Friday 25 February 2011, 14:29:18 Alexander Stein wrote:
> > > This patch adds a generic driver for slide switches connected to GPIO
> > > pins of a system. It requires gpiolib and generic hardware irqs.

> Hm, can't it be merged with gpio_keys? Just add the 'value' to the
> gpio_keys_button structure that would be valid for EV_ABS (or even
> EV_REL) types. Debouncing should filter out jittery events...

Sorry, for no answer long time.
I just tried merging both. The problem i noticed is that the PGIO interrupts 
are independable and each GPIO will generate an event, which is wrong.
Assume the switch state change from position 2 to 1 it will actually generate 
lots of interrupts: e.g. 2, 1, 2, 1.
Depending from the order of such interrupts the last event shows a possible 
wrong position.
This can only be avoided if each GPIO interrupt starts the same state checking 
routine. Thus reading the GPIO pin state and report just one event.
Some ideas to still merge those drivers?

Regards,
Alexander
--
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