hh.org updates
[hh.org.git] / arch / arm / mach-pxa / htcsable / htcsable_keyboard.c
blob272b777da856fb9dee77ddbbd80368f1f5bbc1b9
1 /*
2 * htcsable_keyboard.c
3 * Keyboard support for the hw6915 ipaq
5 * Copyright (C) 2006 Luke Kenneth Casson Leighton
7 * This code is released under the GNU General Public License
9 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
11 #include <linux/platform_device.h>
12 #include <linux/delay.h>
13 #include <linux/input.h>
14 #include <linux/input_pda.h>
15 #include <linux/interrupt.h>
16 #include <linux/irq.h>
17 #include <asm/arch/htcsable-gpio.h>
18 #include <asm/arch/pxa-regs.h>
19 #include <asm/arch/pxa27x_keyboard.h>
20 #include <asm/hardware.h>
21 #include <asm/arch/bitfield.h>
23 /****************************************************************
24 * Pull out keyboard
25 ****************************************************************/
27 static struct pxa27x_keyboard_platform_data htcsable_kbd = {
28 .nr_rows = 7,
29 .nr_cols = 7,
30 .keycodes = {
32 /* row 0 */
33 -1, // Unused
34 KEY_LEFTSHIFT, // Left Shift .
35 -1, // Unused
36 KEY_Q, // Q .
37 KEY_W, // W .
38 KEY_E, // E .
39 KEY_R, // R .
40 }, { /* row 1 */
41 -1, // Unused
42 -1, // Unused
43 KEY_LEFTALT, // Red Dot .
44 KEY_T, // T .
45 KEY_Y, // Y .
46 KEY_U, // U .
47 KEY_I, // I .
48 }, { /* row 2 */
49 KEY_PHONE, // Phone Up .
50 KEY_TAB, // Tab .
51 -1, // Unused
52 KEY_ENTER, // Return .
53 KEY_SPACE, // Space .
54 KEY_BACKSPACE, // Backspace .
55 KEY_A, // A .
56 }, { /* row 3 */
57 KEY_STOP, // Phone Down .
58 KEY_S, // S .
59 KEY_D, // D .
60 KEY_F, // F .
61 KEY_G, // G .
62 KEY_H, // H .
63 KEY_J, // J .
64 }, { /* row 4 */
65 KEY_LEFTMETA, // Left Menu .
66 KEY_K, // K .
67 KEY_Z, // Z .
68 KEY_X, // X .
69 KEY_C, // C .
70 KEY_V, // V .
71 KEY_B, // B .
72 }, { /* row 5 */
73 KEY_RIGHTMETA, // Right Menu .
74 KEY_N, // N .
75 KEY_M, // M .
76 KEY_O, // O .
77 KEY_L, // L .
78 KEY_P, // P .
79 KEY_APOSTROPHE, // ' .
80 }, { /* row 6 */
81 KEY_CAMERA, // Camera .
82 KEY_DOT, // . .
83 KEY_COMMA, // , .
84 -1, // unused
85 -1, // unused
86 KEY_MENU, // Menu button .
87 KEY_OK, // OK button .
90 .gpio_modes = {
91 GPIO_NR_HTCSABLE_KP_MKIN0_MD,
92 GPIO_NR_HTCSABLE_KP_MKIN1_MD,
93 GPIO_NR_HTCSABLE_KP_MKIN2_MD,
94 GPIO_NR_HTCSABLE_KP_MKIN3_MD,
95 GPIO_NR_HTCSABLE_KP_MKIN4_MD,
96 GPIO_NR_HTCSABLE_KP_MKIN5_MD,
97 GPIO_NR_HTCSABLE_KP_MKIN6_MD,
98 GPIO_NR_HTCSABLE_KP_MKIN7_MD,
99 GPIO_NR_HTCSABLE_KP_MKOUT0_MD,
100 GPIO_NR_HTCSABLE_KP_MKOUT1_MD,
101 GPIO_NR_HTCSABLE_KP_MKOUT2_MD,
102 GPIO_NR_HTCSABLE_KP_MKOUT3_MD,
103 GPIO_NR_HTCSABLE_KP_MKOUT4_MD,
104 GPIO_NR_HTCSABLE_KP_MKOUT5_MD,
105 GPIO_NR_HTCSABLE_KP_MKOUT6_MD,
106 GPIO_NR_HTCSABLE_KP_MKOUT7_MD,
110 struct platform_device htcsable_keyboard = {
111 .name = "pxa27x-keyboard",
112 .id = -1,
113 .dev = {
114 .platform_data = &htcsable_kbd,