From 868a719e9d34b5dcad5e02a6610c8a9d17756332 Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Date: Fri, 24 Feb 2012 00:51:40 -0800 Subject: Input: spear-keyboard - delete redundant key definitions from 9x9 keyboard Signed-off-by: Rajeev Kumar Signed-off-by: Viresh Kumar Signed-off-by: Dmitry Torokhov --- arch/arm/plat-spear/include/plat/keyboard.h | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'arch/arm/plat-spear') diff --git a/arch/arm/plat-spear/include/plat/keyboard.h b/arch/arm/plat-spear/include/plat/keyboard.h index 68b5394..004195f 100644 --- a/arch/arm/plat-spear/include/plat/keyboard.h +++ b/arch/arm/plat-spear/include/plat/keyboard.h @@ -62,24 +62,6 @@ int _name[] = { \ KEY(4, 6, KEY_Z), \ KEY(4, 7, KEY_X), \ KEY(4, 8, KEY_C), \ - KEY(4, 0, KEY_L), \ - KEY(4, 1, KEY_SEMICOLON), \ - KEY(4, 2, KEY_APOSTROPHE), \ - KEY(4, 3, KEY_GRAVE), \ - KEY(4, 4, KEY_LEFTSHIFT), \ - KEY(4, 5, KEY_BACKSLASH), \ - KEY(4, 6, KEY_Z), \ - KEY(4, 7, KEY_X), \ - KEY(4, 8, KEY_C), \ - KEY(4, 0, KEY_L), \ - KEY(4, 1, KEY_SEMICOLON), \ - KEY(4, 2, KEY_APOSTROPHE), \ - KEY(4, 3, KEY_GRAVE), \ - KEY(4, 4, KEY_LEFTSHIFT), \ - KEY(4, 5, KEY_BACKSLASH), \ - KEY(4, 6, KEY_Z), \ - KEY(4, 7, KEY_X), \ - KEY(4, 8, KEY_C), \ KEY(5, 0, KEY_V), \ KEY(5, 1, KEY_B), \ KEY(5, 2, KEY_N), \ -- cgit v1.1 From 5e238b548aac6227ce296d41364a3f7b10caff44 Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Date: Fri, 24 Feb 2012 00:51:40 -0800 Subject: Input: spear-keyboard - add 6x6 keypad matrix definitions Add 6x6 keypad matrix and rename 9x9 keymap Signed-off-by: Rajeev Kumar Signed-off-by: Viresh Kumar Signed-off-by: Dmitry Torokhov --- arch/arm/plat-spear/include/plat/keyboard.h | 42 ++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'arch/arm/plat-spear') diff --git a/arch/arm/plat-spear/include/plat/keyboard.h b/arch/arm/plat-spear/include/plat/keyboard.h index 004195f..130c045 100644 --- a/arch/arm/plat-spear/include/plat/keyboard.h +++ b/arch/arm/plat-spear/include/plat/keyboard.h @@ -15,7 +15,7 @@ #include #include -#define DECLARE_KEYMAP(_name) \ +#define DECLARE_9x9_KEYMAP(_name) \ int _name[] = { \ KEY(0, 0, KEY_ESC), \ KEY(0, 1, KEY_1), \ @@ -100,6 +100,46 @@ int _name[] = { \ KEY(8, 8, KEY_KP0), \ } +#define DECLARE_6x6_KEYMAP(_name) \ +int _name[] = { \ + KEY(0, 0, KEY_RESERVED), \ + KEY(0, 1, KEY_1), \ + KEY(0, 2, KEY_2), \ + KEY(0, 3, KEY_3), \ + KEY(0, 4, KEY_4), \ + KEY(0, 5, KEY_5), \ + KEY(1, 0, KEY_Q), \ + KEY(1, 1, KEY_W), \ + KEY(1, 2, KEY_E), \ + KEY(1, 3, KEY_R), \ + KEY(1, 4, KEY_T), \ + KEY(1, 5, KEY_Y), \ + KEY(2, 0, KEY_D), \ + KEY(2, 1, KEY_F), \ + KEY(2, 2, KEY_G), \ + KEY(2, 3, KEY_H), \ + KEY(2, 4, KEY_J), \ + KEY(2, 5, KEY_K), \ + KEY(3, 0, KEY_B), \ + KEY(3, 1, KEY_N), \ + KEY(3, 2, KEY_M), \ + KEY(3, 3, KEY_COMMA), \ + KEY(3, 4, KEY_DOT), \ + KEY(3, 5, KEY_SLASH), \ + KEY(4, 0, KEY_F6), \ + KEY(4, 1, KEY_F7), \ + KEY(4, 2, KEY_F8), \ + KEY(4, 3, KEY_F9), \ + KEY(4, 4, KEY_F10), \ + KEY(4, 5, KEY_NUMLOCK), \ + KEY(5, 0, KEY_KP2), \ + KEY(5, 1, KEY_KP3), \ + KEY(5, 2, KEY_KP0), \ + KEY(5, 3, KEY_KPDOT), \ + KEY(5, 4, KEY_RO), \ + KEY(5, 5, KEY_ZENKAKUHANKAKU), \ +} + /** * struct kbd_platform_data - spear keyboard platform data * keymap: pointer to keymap data (table and size) -- cgit v1.1 From f8354c60ca2212810c168d8f992559226c8c0e71 Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Date: Fri, 24 Feb 2012 00:51:40 -0800 Subject: Input: spear-keyboard - configure device according to supplied mode Let platform pass mode information to keyboard driver according to which it configures itself. The mode can be - KEYPAD_9x9 0 - KEYPAD_6x6 1 - KEYPAD_2x2 2 Signed-off-by: Rajeev Kumar Signed-off-by: Viresh Kumar Signed-off-by: Dmitry Torokhov --- arch/arm/plat-spear/include/plat/keyboard.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/arm/plat-spear') diff --git a/arch/arm/plat-spear/include/plat/keyboard.h b/arch/arm/plat-spear/include/plat/keyboard.h index 130c045..c16cc31 100644 --- a/arch/arm/plat-spear/include/plat/keyboard.h +++ b/arch/arm/plat-spear/include/plat/keyboard.h @@ -140,10 +140,15 @@ int _name[] = { \ KEY(5, 5, KEY_ZENKAKUHANKAKU), \ } +#define KEYPAD_9x9 0 +#define KEYPAD_6x6 1 +#define KEYPAD_2x2 2 + /** * struct kbd_platform_data - spear keyboard platform data * keymap: pointer to keymap data (table and size) * rep: enables key autorepeat + * mode: choose keyboard support(9x9, 6x6, 2x2) * * This structure is supposed to be used by platform code to supply * keymaps to drivers that implement keyboards. @@ -151,6 +156,7 @@ int _name[] = { \ struct kbd_platform_data { const struct matrix_keymap_data *keymap; bool rep; + unsigned int mode; }; /* This function is used to set platform data field of pdev->dev */ -- cgit v1.1