On Thu, 2008-01-31 at 23:14 +0530, ext Girish wrote: ... > I havn't seen the patch in detail. But, I tried this patch on my keypad layout(t2 keypad matrix). There is some strange behaviour. > If I keep pressing the keys one after the other, at some point of time I get suppurious key code/dumps some invalid key code > values(?). Have you noticed this? I haven't seen that one with normal matrix switches. I have that problem if I ground a row-line, then sometimes it is not detected as a non- matrix key, but rather 1-7 spurious keys. But that seems to related to the way T2 is debouncing the switches, so I probably have to rework that part of the patch later. Your problem must be related to this one in line 161: for (col = 0; col < n_cols + 1; col++) { Could it be random stuff in that last col? What is the matrix position it complains about? Try to add the attached patch (or change): if (col == 0xFF) return (1 << n_cols); else - return col; + return col & ((1 << n_cols) - 1); BR, Klaus > Regards, > Girish >
Attachment:
0001-T2-keypad-mask-unused-COL-bits.patch
Description: application/mbox