]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/i2c/twl4030.h
twl4030_keypad cleanup
[linux-2.6-omap-h63xx.git] / include / linux / i2c / twl4030.h
index 17bd4007fa3430de51e0594a822353084d3b695d..c89d33bb772eab579f5f860c5c7c9705248d5688 100644 (file)
@@ -302,11 +302,19 @@ struct twl4030_madc_platform_data {
        int             irq_line;
 };
 
+/* 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))
+#define PERSISTENT_KEY(c, r)   KEY(c, r, KEY_PERSISTENT)
+
 struct twl4030_keypad_data {
-       int rows;
-       int cols;
-       int *keymap;
-       unsigned int keymapsize;
+       unsigned rows;
+       unsigned cols;
+       unsigned *keymap;
+       unsigned short keymapsize;
        unsigned int rep:1;
 };