While getting trying to get the keyboard driver to accept my
keyboard layout I found and fixed a few bugs.
- Fixed the driver to respect the matrix size and .rep
fields from "struct omap_kp_platform_data"
- Fixed misc. configuration problems.
- Fixed some problems with the interrupt/polling code by
implementing 100% event driven scan handling (there
was a race between the timer and interrupt initiated
calls to twl_4030_kp_scan()).
- Too many interrupts was delivered -> enable "PENDING_DISABLE".
- The controller would hang with keys stuck on -> program
KEYP_TIMEOUT so sensible timeout.
Other enhancements:
- Simple ghost key suppression.
- Support for non-matrix switches. That is switches connected
between GND and a row.
To configure the driver for the non-matrix switches you add the
key as you normally would, but the col-index will have to be the
same value as the col-size.
For example with .cols = 2 and you will use the value "2" for
COL for the two non-matrix switches:
I might have gone too far when fixing the twl4030-keypad.h file,
but I was loosing breath and attention spelling my way through
these 32+ letter identifiers with names like: