Re: [PATCH] Input: matrix-keypad - support binary column select gpios
From: Anatolij Gustschin <agust@denx.de>
Date: 2013-01-30 08:45:54
Hi Dmitry, On Tue, 29 Jan 2013 17:16:29 -0800 Dmitry Torokhov [off-list ref] wrote: ...
On Tue, Jan 29, 2013 at 01:25:24PM +0100, Anatolij Gustschin wrote:quoted
On hardware with limited gpios one column select gpio can select two different rows when using some additional hardware logic: high value selects one row, low value selects another row. Add support for such matrix keyboards and document device tree bindings used to describe them. Since half of the columns is always not selected, interrupts won't be generated for press events on these columns. To generate interrupts for not selected columns we need to periodicaly switch to these columns in order to catch the potential press events. This is done by additional work function.So this effectively switches the driver from interrupt driven to polled model, right? The device does not really need an interrupt anymore...
Yes, partially. I do not need to scan the state of the rows right after column switching. The interrupts for press events will only be generated if a key in the affected row was actually pressed. So the device is still interrupt driven and the row state read-out happens in the work scheduled from the interrupt handler. Thanks, Anatolij