On Thursday 29 January 2009, hartleys wrote:
> > +/* Boards have uniqe mappings of {col, row} --> keycode.
> > + * Column and row are 4 bits, but range only from 0..7;
> > + * a PERSISTENT_KEY is "always on" and never reported.
> > + */
> > +#define KEY_PERSISTENT 0x00800000
> > +#define KEY(col, row, keycode) (((col) << 28) | ((row) << 24) |
> (keycode))
>
> The same KEY macro is defined in:
>
> arch/arm/mach-pxa/include/mach/pxa27x_keypad.h
> arch/arm/plat-omap/include/mach/keypad.h
I copied it from the OMAP version as part of removing
needless OMAP dependencies from this driver.
> I also have a keypad driver for the ep93xx that uses the same macro.
>
> Shouldn't/couldn't this be generalized and added to the
> include/linux/input.h file? Allowing 4-bits for row/col gives a maximum
> key matrix of 16x16 keys which should be enough for just about anything.
Makes sense. But that's not what this patch is
about, and I also think the KEY prefix is probably
too generic.
I'd support an overall cleanup patch that fixes
all those things at once.
- Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html