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 /****************************************************************
25 ****************************************************************/
27 static struct pxa27x_keyboard_platform_data htcsable_kbd
= {
34 KEY_LEFTSHIFT
, // Left Shift .
43 KEY_LEFTALT
, // Red Dot .
49 KEY_PHONE
, // Phone Up .
52 KEY_ENTER
, // Return .
54 KEY_BACKSPACE
, // Backspace .
57 KEY_STOP
, // Phone Down .
65 KEY_LEFTMETA
, // Left Menu .
73 KEY_RIGHTMETA
, // Right Menu .
79 KEY_APOSTROPHE
, // ' .
81 KEY_CAMERA
, // Camera .
86 KEY_MENU
, // Menu button .
87 KEY_OK
, // OK button .
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",
114 .platform_data
= &htcsable_kbd
,