+#include <asm/arch/mcbsp.h>
+#include <asm/arch/omap-alsa.h>
+#include <asm/arch/h6300_uart_info.h>
+
+#define _h6300_KEY_CALENDAR 67 // xmodmap 75 aka F9
+#define _H6300_KEY_TELEPHONE 68 // xmodmap 76 aka F10
+#define _H6300_KEY_HOMEPAGE 87 // xmodmap 87 aka Num_Lock
+#define _H6300_KEY_MAIL 88 // xmodmap 88 aka Scroll_Lock
+
+/*
+ * When joypad is pressed on h63xx to up, right, down or left direction,
+ * it does not send keypress events directly from those directions.
+ * Instead we receive multiple events from the keypresses on directions
+ * up_right, down_right, down_left, up_left and ok.
+ * Therefore we are summing those events in kernel level and then
+ * making a decision which event is send to userspace. (up, right, down or left)
+ */
+#define _H6300_JOYPAD_UP_RIGHT 1 // 00001
+#define _H6300_JOYPAD_DOWN_RIGHT 2 // 00010
+#define _h6300_JOYPAD_DOWN_LEFT 4 // 00100
+#define _h6300_JOYPAD_UP_LEFT 8 // 01000
+#define _H6300_JOYPAD_KEY_OK 16 // 10000
+
+static int h6300_keymap[] = {
+ KEY(2, 0, _h6300_KEY_CALENDAR), // address button in the bottom left of iPAQ keypad
+ KEY(2, 3, _H6300_KEY_TELEPHONE), // start call button in the bottom of iPAQ keypad
+ KEY(3, 1, _H6300_KEY_HOMEPAGE), // stop call button in the bottom of iPAQ keypad
+ KEY(3, 4, _H6300_KEY_MAIL), // messaging button in the bottom right of iPAQ keypad
+
+ KEY(0, 0, KEY_VOLUMEUP), // volume up button in the right side of iPAQ keypad
+ KEY(0, 1, KEY_VOLUMEDOWN), // volume down button in the right side of iPAQ keypad
+ KEY(3, 2, KEY_RECORD), // record button in the left side of iPAQ keypad
+
+ KEY(1, 0, _h6300_JOYPAD_UP_LEFT),
+ KEY(1, 1, _h6300_JOYPAD_DOWN_LEFT),
+ KEY(1, 2, _H6300_JOYPAD_KEY_OK),
+ KEY(1, 3, _H6300_JOYPAD_DOWN_RIGHT),
+ KEY(1, 4, _H6300_JOYPAD_UP_RIGHT),
+
+ KEY(4, 0, KEY_RIGHT),
+ KEY(4, 1, KEY_DOWN),
+ KEY(4, 2, KEY_LEFT),
+ KEY(4, 3, KEY_UP),
+ KEY(4, 4, KEY_ENTER),
+
+ 0
+};