Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91234
b: refs/heads/master
c: 55c26e4
h: refs/heads/master
v: v3
  • Loading branch information
eric miao authored and Russell King committed Apr 19, 2008
1 parent 5b38bd7 commit 8206bf4
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 37320980414f5a7654ee08a047194224c6bba46e
refs/heads/master: 55c26e4011572a2e1329cbff92e930838010ba88
54 changes: 54 additions & 0 deletions trunk/arch/arm/mach-pxa/mainstone.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#include <asm/arch/mmc.h>
#include <asm/arch/irda.h>
#include <asm/arch/ohci.h>
#include <asm/arch/pxa27x_keypad.h>

#include "generic.h"
#include "devices.h"
Expand Down Expand Up @@ -548,6 +549,57 @@ static struct pxaohci_platform_data mainstone_ohci_platform_data = {
.init = mainstone_ohci_init,
};

#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULES)
static unsigned int mainstone_matrix_keys[] = {
KEY(0, 0, KEY_A), KEY(1, 0, KEY_B), KEY(2, 0, KEY_C),
KEY(3, 0, KEY_D), KEY(4, 0, KEY_E), KEY(5, 0, KEY_F),
KEY(0, 1, KEY_G), KEY(1, 1, KEY_H), KEY(2, 1, KEY_I),
KEY(3, 1, KEY_J), KEY(4, 1, KEY_K), KEY(5, 1, KEY_L),
KEY(0, 2, KEY_M), KEY(1, 2, KEY_N), KEY(2, 2, KEY_O),
KEY(3, 2, KEY_P), KEY(4, 2, KEY_Q), KEY(5, 2, KEY_R),
KEY(0, 3, KEY_S), KEY(1, 3, KEY_T), KEY(2, 3, KEY_U),
KEY(3, 3, KEY_V), KEY(4, 3, KEY_W), KEY(5, 3, KEY_X),
KEY(2, 4, KEY_Y), KEY(3, 4, KEY_Z),

KEY(0, 4, KEY_DOT), /* . */
KEY(1, 4, KEY_CLOSE), /* @ */
KEY(4, 4, KEY_SLASH),
KEY(5, 4, KEY_BACKSLASH),
KEY(0, 5, KEY_HOME),
KEY(1, 5, KEY_LEFTSHIFT),
KEY(2, 5, KEY_SPACE),
KEY(3, 5, KEY_SPACE),
KEY(4, 5, KEY_ENTER),
KEY(5, 5, KEY_BACKSPACE),

KEY(0, 6, KEY_UP),
KEY(1, 6, KEY_DOWN),
KEY(2, 6, KEY_LEFT),
KEY(3, 6, KEY_RIGHT),
KEY(4, 6, KEY_SELECT),
};

struct pxa27x_keypad_platform_data mainstone_keypad_info = {
.matrix_key_rows = 6,
.matrix_key_cols = 7,
.matrix_key_map = mainstone_matrix_keys,
.matrix_key_map_size = ARRAY_SIZE(mainstone_matrix_keys),

.enable_rotary0 = 1,
.rotary0_up_key = KEY_UP,
.rotary0_down_key = KEY_DOWN,

.debounce_interval = 30,
};

static void __init mainstone_init_keypad(void)
{
pxa_set_keypad_info(&mainstone_keypad_info);
}
#else
static inline void mainstone_init_keypad(void) {}
#endif

static void __init mainstone_init(void)
{
int SW7 = 0; /* FIXME: get from SCR (Mst doc section 3.2.1.1) */
Expand Down Expand Up @@ -585,6 +637,8 @@ static void __init mainstone_init(void)
pxa_set_mci_info(&mainstone_mci_platform_data);
pxa_set_ficp_info(&mainstone_ficp_platform_data);
pxa_set_ohci_info(&mainstone_ohci_platform_data);

mainstone_init_keypad();
}


Expand Down

0 comments on commit 8206bf4

Please sign in to comment.