On Friday, January 08, 2010 11:58 AM, Alberto Panizzo wrote:> The MXC family of Application Processors is shipped with a> Keypad Port supported now by this driver.> > The peripheral can control up to an 8x8 matrix key pad where> all the scanning procedure is done via software. > > The hardware provide two interrupts: one for a key pressed (KDI)> and one for all key releases (KRI). There is also a simple circuit for glitch > reduction (said for synchronization) made by two series of 3 D-latches> that stabilize the interrupts sources.> KDI and KRI are fired only if the respective conditions are maintained for > at last 4 keypad-clock cycle.> > Those simple synchronization circuits are used also for multiple> key pressures: between a KDI and a KRI the driver reset the > sync circuit and re-enable the KDI interrupt so after 3> keypad-clock cycle another KDI is fired making possible to repeat> the matrix scan operation.> > This algorithm is done via a threaded management of the keypad> interrupt source and delayed by a proper (and longer) debounce> interval controlled by the platform initialization.> If a key is pressed for a lot of time, the driver relaxes a bit> the timings to not over load the cpu in a long time keypad interaction.> > Key configuration is done via platform initialization in > a standard matrix_keypad manner.> > This driver is tested for build in kernel or as a module> and follow the specification of freescale i.MX 25 27 31 35 51> especially it is tested in the mx31pdk board.>

You might consider using some of the matrix_keypad support already inthe kernel. Specific's below.