Matrix keypad driver

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

 



I am using the matrix keypad driver and I have noticed an issue where
when pressing multiple keys in the same row, only the first key is
detected.

In this driver, the logic is that we are driving the columns and
listening for interrupts on the rows.  If you press one key on row y
the following events occur:

* row y is asserted
* interrupt is generated
* debounce timeout expires
* interrupts are disabled
* matrix is scanned one column at a time
* all columns are activated
* interrupts are enabled

The problem is that if I hold this first key down and press another
key in row y, no interrupt is generated since there is now no signal
change.

If we look at the corgi driver as an example, a timer is scheduled at
the end of the scan any time a key is down.  The comment indicates
this is to catch released keys, but this method will also catch
additional key presses in the same row.  This comes at the expense of
constant scanning at some ms interval, but only when a key is held.

Another way to implement a similar process is to let the interrupt
handler continue to schedule the scan by re-enabling interrupts before
driving the columns.  This way, if any key is held down during the
scan, a new scan will be scheduled by the interrupt handler after the
debounce period.
--
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