diff options
author | Tony Lindgren <tony@atomide.com> | 2009-09-24 19:23:16 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-09-24 19:23:16 -0400 |
commit | 4f5433324d1e29cf234d5b1b14782c0fc2948298 (patch) | |
tree | 8f90507db97315f47dfc5e6ad4214cfc4ca7ba94 /arch | |
parent | 501e9bd5ff00ea726e91cef7df61f889bdec2105 (diff) |
omap: Fix matrix_keymap_data usage
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/board-3430sdp.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-ldp.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3evm.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3pandora.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-rx51-peripherals.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-zoom2.c | 10 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/keypad.h | 5 |
7 files changed, 44 insertions, 21 deletions
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index bd57ec76dc5e..efaf053eba85 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
@@ -54,7 +54,7 @@ | |||
54 | 54 | ||
55 | #define TWL4030_MSECURE_GPIO 22 | 55 | #define TWL4030_MSECURE_GPIO 22 |
56 | 56 | ||
57 | static int sdp3430_keymap[] = { | 57 | static int board_keymap[] = { |
58 | KEY(0, 0, KEY_LEFT), | 58 | KEY(0, 0, KEY_LEFT), |
59 | KEY(0, 1, KEY_RIGHT), | 59 | KEY(0, 1, KEY_RIGHT), |
60 | KEY(0, 2, KEY_A), | 60 | KEY(0, 2, KEY_A), |
@@ -88,11 +88,15 @@ static int sdp3430_keymap[] = { | |||
88 | 0 | 88 | 0 |
89 | }; | 89 | }; |
90 | 90 | ||
91 | static struct matrix_keymap_data board_map_data = { | ||
92 | .keymap = board_keymap, | ||
93 | .keymap_size = ARRAY_SIZE(board_keymap), | ||
94 | }; | ||
95 | |||
91 | static struct twl4030_keypad_data sdp3430_kp_data = { | 96 | static struct twl4030_keypad_data sdp3430_kp_data = { |
97 | .keymap_data = &board_map_data, | ||
92 | .rows = 5, | 98 | .rows = 5, |
93 | .cols = 6, | 99 | .cols = 6, |
94 | .keymap = sdp3430_keymap, | ||
95 | .keymapsize = ARRAY_SIZE(sdp3430_keymap), | ||
96 | .rep = 1, | 100 | .rep = 1, |
97 | }; | 101 | }; |
98 | 102 | ||
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index ec6854cbdd9f..d110a7fdfbd8 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
@@ -80,7 +80,7 @@ static struct platform_device ldp_smsc911x_device = { | |||
80 | }, | 80 | }, |
81 | }; | 81 | }; |
82 | 82 | ||
83 | static int ldp_twl4030_keymap[] = { | 83 | static int board_keymap[] = { |
84 | KEY(0, 0, KEY_1), | 84 | KEY(0, 0, KEY_1), |
85 | KEY(1, 0, KEY_2), | 85 | KEY(1, 0, KEY_2), |
86 | KEY(2, 0, KEY_3), | 86 | KEY(2, 0, KEY_3), |
@@ -101,11 +101,15 @@ static int ldp_twl4030_keymap[] = { | |||
101 | 0 | 101 | 0 |
102 | }; | 102 | }; |
103 | 103 | ||
104 | static struct matrix_keymap_data board_map_data = { | ||
105 | .keymap = board_keymap, | ||
106 | .keymap_size = ARRAY_SIZE(board_keymap), | ||
107 | }; | ||
108 | |||
104 | static struct twl4030_keypad_data ldp_kp_twl4030_data = { | 109 | static struct twl4030_keypad_data ldp_kp_twl4030_data = { |
110 | .keymap_data = &board_map_data, | ||
105 | .rows = 6, | 111 | .rows = 6, |
106 | .cols = 6, | 112 | .cols = 6, |
107 | .keymap = ldp_twl4030_keymap, | ||
108 | .keymapsize = ARRAY_SIZE(ldp_twl4030_keymap), | ||
109 | .rep = 1, | 113 | .rep = 1, |
110 | }; | 114 | }; |
111 | 115 | ||
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index d50b9be90580..e4ec0c591216 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -159,7 +159,7 @@ static struct twl4030_usb_data omap3evm_usb_data = { | |||
159 | .usb_mode = T2_USB_MODE_ULPI, | 159 | .usb_mode = T2_USB_MODE_ULPI, |
160 | }; | 160 | }; |
161 | 161 | ||
162 | static int omap3evm_keymap[] = { | 162 | static int board_keymap[] = { |
163 | KEY(0, 0, KEY_LEFT), | 163 | KEY(0, 0, KEY_LEFT), |
164 | KEY(0, 1, KEY_RIGHT), | 164 | KEY(0, 1, KEY_RIGHT), |
165 | KEY(0, 2, KEY_A), | 165 | KEY(0, 2, KEY_A), |
@@ -178,11 +178,15 @@ static int omap3evm_keymap[] = { | |||
178 | KEY(3, 3, KEY_P) | 178 | KEY(3, 3, KEY_P) |
179 | }; | 179 | }; |
180 | 180 | ||
181 | static struct matrix_keymap_data board_map_data = { | ||
182 | .keymap = board_keymap, | ||
183 | .keymap_size = ARRAY_SIZE(board_keymap), | ||
184 | }; | ||
185 | |||
181 | static struct twl4030_keypad_data omap3evm_kp_data = { | 186 | static struct twl4030_keypad_data omap3evm_kp_data = { |
187 | .keymap_data = &board_map_data, | ||
182 | .rows = 4, | 188 | .rows = 4, |
183 | .cols = 4, | 189 | .cols = 4, |
184 | .keymap = omap3evm_keymap, | ||
185 | .keymapsize = ARRAY_SIZE(omap3evm_keymap), | ||
186 | .rep = 1, | 190 | .rep = 1, |
187 | }; | 191 | }; |
188 | 192 | ||
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index b43f6e36b6d9..7f6bf8772af7 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c | |||
@@ -133,7 +133,7 @@ static void __init pandora_keys_gpio_init(void) | |||
133 | omap_set_gpio_debounce_time(32 * 5, GPIO_DEBOUNCE_TIME); | 133 | omap_set_gpio_debounce_time(32 * 5, GPIO_DEBOUNCE_TIME); |
134 | } | 134 | } |
135 | 135 | ||
136 | static int pandora_keypad_map[] = { | 136 | static int board_keymap[] = { |
137 | /* col, row, code */ | 137 | /* col, row, code */ |
138 | KEY(0, 0, KEY_9), | 138 | KEY(0, 0, KEY_9), |
139 | KEY(0, 1, KEY_0), | 139 | KEY(0, 1, KEY_0), |
@@ -180,11 +180,15 @@ static int pandora_keypad_map[] = { | |||
180 | KEY(5, 2, KEY_FN), | 180 | KEY(5, 2, KEY_FN), |
181 | }; | 181 | }; |
182 | 182 | ||
183 | static struct matrix_keymap_data board_map_data = { | ||
184 | .keymap = board_keymap, | ||
185 | .keymap_size = ARRAY_SIZE(board_keymap), | ||
186 | }; | ||
187 | |||
183 | static struct twl4030_keypad_data pandora_kp_data = { | 188 | static struct twl4030_keypad_data pandora_kp_data = { |
189 | .keymap_data = &board_map_data, | ||
184 | .rows = 8, | 190 | .rows = 8, |
185 | .cols = 6, | 191 | .cols = 6, |
186 | .keymap = pandora_keypad_map, | ||
187 | .keymapsize = ARRAY_SIZE(pandora_keypad_map), | ||
188 | .rep = 1, | 192 | .rep = 1, |
189 | }; | 193 | }; |
190 | 194 | ||
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index e6e8290b7828..b45ad312c587 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #define SYSTEM_REV_B_USES_VAUX3 0x1699 | 36 | #define SYSTEM_REV_B_USES_VAUX3 0x1699 |
37 | #define SYSTEM_REV_S_USES_VAUX3 0x8 | 37 | #define SYSTEM_REV_S_USES_VAUX3 0x8 |
38 | 38 | ||
39 | static int rx51_keymap[] = { | 39 | static int board_keymap[] = { |
40 | KEY(0, 0, KEY_Q), | 40 | KEY(0, 0, KEY_Q), |
41 | KEY(0, 1, KEY_W), | 41 | KEY(0, 1, KEY_W), |
42 | KEY(0, 2, KEY_E), | 42 | KEY(0, 2, KEY_E), |
@@ -83,11 +83,15 @@ static int rx51_keymap[] = { | |||
83 | KEY(0xff, 5, KEY_F10), | 83 | KEY(0xff, 5, KEY_F10), |
84 | }; | 84 | }; |
85 | 85 | ||
86 | static struct matrix_keymap_data board_map_data = { | ||
87 | .keymap = board_keymap, | ||
88 | .keymap_size = ARRAY_SIZE(board_keymap), | ||
89 | }; | ||
90 | |||
86 | static struct twl4030_keypad_data rx51_kp_data = { | 91 | static struct twl4030_keypad_data rx51_kp_data = { |
92 | .keymap_data = &board_map_data, | ||
87 | .rows = 8, | 93 | .rows = 8, |
88 | .cols = 8, | 94 | .cols = 8, |
89 | .keymap = rx51_keymap, | ||
90 | .keymapsize = ARRAY_SIZE(rx51_keymap), | ||
91 | .rep = 1, | 95 | .rep = 1, |
92 | }; | 96 | }; |
93 | 97 | ||
diff --git a/arch/arm/mach-omap2/board-zoom2.c b/arch/arm/mach-omap2/board-zoom2.c index 324009edbd53..b7b32208ced7 100644 --- a/arch/arm/mach-omap2/board-zoom2.c +++ b/arch/arm/mach-omap2/board-zoom2.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include "mmc-twl4030.h" | 27 | #include "mmc-twl4030.h" |
28 | 28 | ||
29 | /* Zoom2 has Qwerty keyboard*/ | 29 | /* Zoom2 has Qwerty keyboard*/ |
30 | static int zoom2_twl4030_keymap[] = { | 30 | static int board_keymap[] = { |
31 | KEY(0, 0, KEY_E), | 31 | KEY(0, 0, KEY_E), |
32 | KEY(1, 0, KEY_R), | 32 | KEY(1, 0, KEY_R), |
33 | KEY(2, 0, KEY_T), | 33 | KEY(2, 0, KEY_T), |
@@ -82,11 +82,15 @@ static int zoom2_twl4030_keymap[] = { | |||
82 | 0 | 82 | 0 |
83 | }; | 83 | }; |
84 | 84 | ||
85 | static struct matrix_keymap_data board_map_data = { | ||
86 | .keymap = board_keymap, | ||
87 | .keymap_size = ARRAY_SIZE(board_keymap), | ||
88 | }; | ||
89 | |||
85 | static struct twl4030_keypad_data zoom2_kp_twl4030_data = { | 90 | static struct twl4030_keypad_data zoom2_kp_twl4030_data = { |
91 | .keymap_data = &board_map_data, | ||
86 | .rows = 8, | 92 | .rows = 8, |
87 | .cols = 8, | 93 | .cols = 8, |
88 | .keymap = zoom2_twl4030_keymap, | ||
89 | .keymapsize = ARRAY_SIZE(zoom2_twl4030_keymap), | ||
90 | .rep = 1, | 94 | .rep = 1, |
91 | }; | 95 | }; |
92 | 96 | ||
diff --git a/arch/arm/plat-omap/include/mach/keypad.h b/arch/arm/plat-omap/include/mach/keypad.h index 45ea3ae3c995..d91b9be334ff 100644 --- a/arch/arm/plat-omap/include/mach/keypad.h +++ b/arch/arm/plat-omap/include/mach/keypad.h | |||
@@ -10,6 +10,8 @@ | |||
10 | #ifndef ASMARM_ARCH_KEYPAD_H | 10 | #ifndef ASMARM_ARCH_KEYPAD_H |
11 | #define ASMARM_ARCH_KEYPAD_H | 11 | #define ASMARM_ARCH_KEYPAD_H |
12 | 12 | ||
13 | #include <linux/input/matrix_keypad.h> | ||
14 | |||
13 | struct omap_kp_platform_data { | 15 | struct omap_kp_platform_data { |
14 | int rows; | 16 | int rows; |
15 | int cols; | 17 | int cols; |
@@ -35,9 +37,6 @@ struct omap_kp_platform_data { | |||
35 | 37 | ||
36 | #define KEY_PERSISTENT 0x00800000 | 38 | #define KEY_PERSISTENT 0x00800000 |
37 | #define KEYNUM_MASK 0x00EFFFFF | 39 | #define KEYNUM_MASK 0x00EFFFFF |
38 | #define KEY(col, row, val) (((col) << 28) | ((row) << 24) | (val)) | ||
39 | #define PERSISTENT_KEY(col, row) (((col) << 28) | ((row) << 24) | \ | ||
40 | KEY_PERSISTENT) | ||
41 | 40 | ||
42 | #endif | 41 | #endif |
43 | 42 | ||