diff options
author | Amit Kucheria <amit.kucheria@verdurent.com> | 2009-10-06 00:43:44 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-10-06 01:00:39 -0400 |
commit | acf442dc560437858e6a4c904678052616f8226e (patch) | |
tree | 44f9ea41b028f35fbaa463c6964954c3925dd678 | |
parent | 4fa5757a4c54fe59c4d7d7a68ac2d0a5493a2bef (diff) |
Input: fix rx51 board keymap
The original driver was written with the KEY() macro defined as (col,
row) instead of (row, col) as defined by the matrix keypad
infrastructure. So the keymap was defined accordingly. Since the
driver that was merged upstream uses the matrix keypad infrastructure,
modify the keymap accordingly.
While we are at it, fix the comments in twl4030.h and define
PERSISTENT_KEY as (r,c) instead of (c, r)
Tested on a RX51 (N900) device.
Signed-off-by: Amit Kucheria <amit.kucheria@verdurent.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r-- | arch/arm/mach-omap2/board-rx51-peripherals.c | 78 | ||||
-rw-r--r-- | include/linux/i2c/twl4030.h | 6 |
2 files changed, 42 insertions, 42 deletions
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index 56d931a425f7..b5ce7a079995 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -37,49 +37,49 @@ | |||
37 | 37 | ||
38 | static int rx51_keymap[] = { | 38 | static int rx51_keymap[] = { |
39 | KEY(0, 0, KEY_Q), | 39 | KEY(0, 0, KEY_Q), |
40 | KEY(0, 1, KEY_W), | 40 | KEY(0, 1, KEY_O), |
41 | KEY(0, 2, KEY_E), | 41 | KEY(0, 2, KEY_P), |
42 | KEY(0, 3, KEY_R), | 42 | KEY(0, 3, KEY_COMMA), |
43 | KEY(0, 4, KEY_T), | 43 | KEY(0, 4, KEY_BACKSPACE), |
44 | KEY(0, 5, KEY_Y), | 44 | KEY(0, 6, KEY_A), |
45 | KEY(0, 6, KEY_U), | 45 | KEY(0, 7, KEY_S), |
46 | KEY(0, 7, KEY_I), | 46 | KEY(1, 0, KEY_W), |
47 | KEY(1, 0, KEY_O), | ||
48 | KEY(1, 1, KEY_D), | 47 | KEY(1, 1, KEY_D), |
49 | KEY(1, 2, KEY_DOT), | 48 | KEY(1, 2, KEY_F), |
50 | KEY(1, 3, KEY_V), | 49 | KEY(1, 3, KEY_G), |
51 | KEY(1, 4, KEY_DOWN), | 50 | KEY(1, 4, KEY_H), |
52 | KEY(2, 0, KEY_P), | 51 | KEY(1, 5, KEY_J), |
53 | KEY(2, 1, KEY_F), | 52 | KEY(1, 6, KEY_K), |
53 | KEY(1, 7, KEY_L), | ||
54 | KEY(2, 0, KEY_E), | ||
55 | KEY(2, 1, KEY_DOT), | ||
54 | KEY(2, 2, KEY_UP), | 56 | KEY(2, 2, KEY_UP), |
55 | KEY(2, 3, KEY_B), | 57 | KEY(2, 3, KEY_ENTER), |
56 | KEY(2, 4, KEY_RIGHT), | 58 | KEY(2, 5, KEY_Z), |
57 | KEY(3, 0, KEY_COMMA), | 59 | KEY(2, 6, KEY_X), |
58 | KEY(3, 1, KEY_G), | 60 | KEY(2, 7, KEY_C), |
59 | KEY(3, 2, KEY_ENTER), | 61 | KEY(3, 0, KEY_R), |
62 | KEY(3, 1, KEY_V), | ||
63 | KEY(3, 2, KEY_B), | ||
60 | KEY(3, 3, KEY_N), | 64 | KEY(3, 3, KEY_N), |
61 | KEY(4, 0, KEY_BACKSPACE), | 65 | KEY(3, 4, KEY_M), |
62 | KEY(4, 1, KEY_H), | 66 | KEY(3, 5, KEY_SPACE), |
63 | KEY(4, 3, KEY_M), | 67 | KEY(3, 6, KEY_SPACE), |
68 | KEY(3, 7, KEY_LEFT), | ||
69 | KEY(4, 0, KEY_T), | ||
70 | KEY(4, 1, KEY_DOWN), | ||
71 | KEY(4, 2, KEY_RIGHT), | ||
64 | KEY(4, 4, KEY_LEFTCTRL), | 72 | KEY(4, 4, KEY_LEFTCTRL), |
65 | KEY(5, 1, KEY_J), | 73 | KEY(4, 5, KEY_RIGHTALT), |
66 | KEY(5, 2, KEY_Z), | 74 | KEY(4, 6, KEY_LEFTSHIFT), |
67 | KEY(5, 3, KEY_SPACE), | 75 | KEY(5, 0, KEY_Y), |
68 | KEY(5, 4, KEY_LEFTSHIFT), | 76 | KEY(6, 0, KEY_U), |
69 | KEY(6, 0, KEY_A), | 77 | KEY(7, 0, KEY_I), |
70 | KEY(6, 1, KEY_K), | 78 | KEY(7, 1, KEY_F7), |
71 | KEY(6, 2, KEY_X), | 79 | KEY(7, 2, KEY_F8), |
72 | KEY(6, 3, KEY_SPACE), | 80 | KEY(0xff, 2, KEY_F9), |
73 | KEY(6, 4, KEY_FN), | 81 | KEY(0xff, 4, KEY_F10), |
74 | KEY(7, 0, KEY_S), | 82 | KEY(0xff, 5, KEY_F11), |
75 | KEY(7, 1, KEY_L), | ||
76 | KEY(7, 2, KEY_C), | ||
77 | KEY(7, 3, KEY_LEFT), | ||
78 | KEY(0xff, 0, KEY_F6), | ||
79 | KEY(0xff, 1, KEY_F7), | ||
80 | KEY(0xff, 2, KEY_F8), | ||
81 | KEY(0xff, 4, KEY_F9), | ||
82 | KEY(0xff, 5, KEY_F10), | ||
83 | }; | 83 | }; |
84 | 84 | ||
85 | static struct twl4030_keypad_data rx51_kp_data = { | 85 | static struct twl4030_keypad_data rx51_kp_data = { |
diff --git a/include/linux/i2c/twl4030.h b/include/linux/i2c/twl4030.h index 3fd21d7cb6bf..007572536ea9 100644 --- a/include/linux/i2c/twl4030.h +++ b/include/linux/i2c/twl4030.h | |||
@@ -305,11 +305,11 @@ struct twl4030_madc_platform_data { | |||
305 | int irq_line; | 305 | int irq_line; |
306 | }; | 306 | }; |
307 | 307 | ||
308 | /* Boards have uniqe mappings of {col, row} --> keycode. | 308 | /* Boards have uniqe mappings of {row, col} --> keycode. |
309 | * Column and row are 4 bits, but range only from 0..7. | 309 | * Column and row are 8 bits each, but range only from 0..7. |
310 | * a PERSISTENT_KEY is "always on" and never reported. | 310 | * a PERSISTENT_KEY is "always on" and never reported. |
311 | */ | 311 | */ |
312 | #define PERSISTENT_KEY(c, r) KEY((c), (r), KEY_RESERVED) | 312 | #define PERSISTENT_KEY(r, c) KEY((r), (c), KEY_RESERVED) |
313 | 313 | ||
314 | struct twl4030_keypad_data { | 314 | struct twl4030_keypad_data { |
315 | const struct matrix_keymap_data *keymap_data; | 315 | const struct matrix_keymap_data *keymap_data; |