omap: Fix matrix_keymap_data usage
authorTony Lindgren <tony@atomide.com>
Thu, 24 Sep 2009 23:23:16 +0000 (16:23 -0700)
committerTony Lindgren <tony@atomide.com>
Thu, 24 Sep 2009 23:23:16 +0000 (16:23 -0700)
Otherwise we'll get compile errors like:

arch/arm/plat-omap/include/mach/keypad.h:38:1: warning: "KEY" redefined
arch/arm/plat-omap/include/mach/keypad.h:39:1: warning: "PERSISTENT_KEY" redefined
...

Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/board-3430sdp.c
arch/arm/mach-omap2/board-ldp.c
arch/arm/mach-omap2/board-omap3evm.c
arch/arm/mach-omap2/board-omap3pandora.c
arch/arm/mach-omap2/board-rx51-peripherals.c
arch/arm/mach-omap2/board-zoom2.c
arch/arm/plat-omap/include/mach/keypad.h

index bd57ec76dc5eedde9f672d34456ed843e0cb0f64..efaf053eba85371a5d59ed1c69f06b2af3436471 100644 (file)
@@ -54,7 +54,7 @@
 
 #define TWL4030_MSECURE_GPIO 22
 
-static int sdp3430_keymap[] = {
+static int board_keymap[] = {
        KEY(0, 0, KEY_LEFT),
        KEY(0, 1, KEY_RIGHT),
        KEY(0, 2, KEY_A),
@@ -88,11 +88,15 @@ static int sdp3430_keymap[] = {
        0
 };
 
+static struct matrix_keymap_data board_map_data = {
+       .keymap                 = board_keymap,
+       .keymap_size            = ARRAY_SIZE(board_keymap),
+};
+
 static struct twl4030_keypad_data sdp3430_kp_data = {
+       .keymap_data    = &board_map_data,
        .rows           = 5,
        .cols           = 6,
-       .keymap         = sdp3430_keymap,
-       .keymapsize     = ARRAY_SIZE(sdp3430_keymap),
        .rep            = 1,
 };
 
index ec6854cbdd9fcb968c5bbdb3ec3e4da0361b1f47..d110a7fdfbd800949aeac4e41a9a93fac121d2c6 100644 (file)
@@ -80,7 +80,7 @@ static struct platform_device ldp_smsc911x_device = {
        },
 };
 
-static int ldp_twl4030_keymap[] = {
+static int board_keymap[] = {
        KEY(0, 0, KEY_1),
        KEY(1, 0, KEY_2),
        KEY(2, 0, KEY_3),
@@ -101,11 +101,15 @@ static int ldp_twl4030_keymap[] = {
        0
 };
 
+static struct matrix_keymap_data board_map_data = {
+       .keymap                 = board_keymap,
+       .keymap_size            = ARRAY_SIZE(board_keymap),
+};
+
 static struct twl4030_keypad_data ldp_kp_twl4030_data = {
+       .keymap_data    = &board_map_data,
        .rows           = 6,
        .cols           = 6,
-       .keymap         = ldp_twl4030_keymap,
-       .keymapsize     = ARRAY_SIZE(ldp_twl4030_keymap),
        .rep            = 1,
 };
 
index d50b9be905802ce5e88bcef03d6dd44100b3ab50..e4ec0c591216c50a2d5d1fdf16c4cf36ecb53e15 100644 (file)
@@ -159,7 +159,7 @@ static struct twl4030_usb_data omap3evm_usb_data = {
        .usb_mode       = T2_USB_MODE_ULPI,
 };
 
-static int omap3evm_keymap[] = {
+static int board_keymap[] = {
        KEY(0, 0, KEY_LEFT),
        KEY(0, 1, KEY_RIGHT),
        KEY(0, 2, KEY_A),
@@ -178,11 +178,15 @@ static int omap3evm_keymap[] = {
        KEY(3, 3, KEY_P)
 };
 
+static struct matrix_keymap_data board_map_data = {
+       .keymap                 = board_keymap,
+       .keymap_size            = ARRAY_SIZE(board_keymap),
+};
+
 static struct twl4030_keypad_data omap3evm_kp_data = {
+       .keymap_data    = &board_map_data,
        .rows           = 4,
        .cols           = 4,
-       .keymap         = omap3evm_keymap,
-       .keymapsize     = ARRAY_SIZE(omap3evm_keymap),
        .rep            = 1,
 };
 
index b43f6e36b6d9d256768169b5760ab927a462cf5f..7f6bf8772af7e6c5ae961ce34d7ce7f041039c05 100644 (file)
@@ -133,7 +133,7 @@ static void __init pandora_keys_gpio_init(void)
        omap_set_gpio_debounce_time(32 * 5, GPIO_DEBOUNCE_TIME);
 }
 
-static int pandora_keypad_map[] = {
+static int board_keymap[] = {
        /* col, row, code */
        KEY(0, 0, KEY_9),
        KEY(0, 1, KEY_0),
@@ -180,11 +180,15 @@ static int pandora_keypad_map[] = {
        KEY(5, 2, KEY_FN),
 };
 
+static struct matrix_keymap_data board_map_data = {
+       .keymap                 = board_keymap,
+       .keymap_size            = ARRAY_SIZE(board_keymap),
+};
+
 static struct twl4030_keypad_data pandora_kp_data = {
+       .keymap_data    = &board_map_data,
        .rows           = 8,
        .cols           = 6,
-       .keymap         = pandora_keypad_map,
-       .keymapsize     = ARRAY_SIZE(pandora_keypad_map),
        .rep            = 1,
 };
 
index e6e8290b7828613fd631abd6556f531f2c27852e..b45ad312c58732c480e6c5b96fb8a4b722e6f688 100644 (file)
@@ -36,7 +36,7 @@
 #define SYSTEM_REV_B_USES_VAUX3        0x1699
 #define SYSTEM_REV_S_USES_VAUX3 0x8
 
-static int rx51_keymap[] = {
+static int board_keymap[] = {
        KEY(0, 0, KEY_Q),
        KEY(0, 1, KEY_W),
        KEY(0, 2, KEY_E),
@@ -83,11 +83,15 @@ static int rx51_keymap[] = {
        KEY(0xff, 5, KEY_F10),
 };
 
+static struct matrix_keymap_data board_map_data = {
+       .keymap                 = board_keymap,
+       .keymap_size            = ARRAY_SIZE(board_keymap),
+};
+
 static struct twl4030_keypad_data rx51_kp_data = {
+       .keymap_data    = &board_map_data,
        .rows           = 8,
        .cols           = 8,
-       .keymap         = rx51_keymap,
-       .keymapsize     = ARRAY_SIZE(rx51_keymap),
        .rep            = 1,
 };
 
index 324009edbd53c7e711aad3ac4cbfc3df1ffb087a..b7b32208ced7768ff43253947916312515080917 100644 (file)
@@ -27,7 +27,7 @@
 #include "mmc-twl4030.h"
 
 /* Zoom2 has Qwerty keyboard*/
-static int zoom2_twl4030_keymap[] = {
+static int board_keymap[] = {
        KEY(0, 0, KEY_E),
        KEY(1, 0, KEY_R),
        KEY(2, 0, KEY_T),
@@ -82,11 +82,15 @@ static int zoom2_twl4030_keymap[] = {
        0
 };
 
+static struct matrix_keymap_data board_map_data = {
+       .keymap                 = board_keymap,
+       .keymap_size            = ARRAY_SIZE(board_keymap),
+};
+
 static struct twl4030_keypad_data zoom2_kp_twl4030_data = {
+       .keymap_data    = &board_map_data,
        .rows           = 8,
        .cols           = 8,
-       .keymap         = zoom2_twl4030_keymap,
-       .keymapsize     = ARRAY_SIZE(zoom2_twl4030_keymap),
        .rep            = 1,
 };
 
index 45ea3ae3c995ab7f0ad51386ad3282836c46419e..d91b9be334ff2ff1b80078f95c1d805c0d278224 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef ASMARM_ARCH_KEYPAD_H
 #define ASMARM_ARCH_KEYPAD_H
 
+#include <linux/input/matrix_keypad.h>
+
 struct omap_kp_platform_data {
        int rows;
        int cols;
@@ -35,9 +37,6 @@ struct omap_kp_platform_data {
 
 #define KEY_PERSISTENT         0x00800000
 #define KEYNUM_MASK            0x00EFFFFF
-#define KEY(col, row, val) (((col) << 28) | ((row) << 24) | (val))
-#define PERSISTENT_KEY(col, row) (((col) << 28) | ((row) << 24) | \
-                                               KEY_PERSISTENT)
 
 #endif