diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2009-01-07 10:14:38 -0500 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2009-01-07 10:14:38 -0500 |
commit | 51ed9ad7d239c7c10af088d1b7c5f3ee8d022f94 (patch) | |
tree | a92651792ea56382edbcf4b662e83cb5a9fbca6a /arch/blackfin/mach-bf537 | |
parent | b03f203986dcf51b556e5f86475338b1588d8652 (diff) |
Blackfin arch: ADP5588 QWERTY I2C Keyboard Input device driver
Add BF537-STAMP platform Support
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/mach-bf537')
-rw-r--r-- | arch/blackfin/mach-bf537/boards/stamp.c | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index c198f9085ad5..8facba669553 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -952,6 +952,93 @@ static struct platform_device i2c_bfin_twi_device = { | |||
952 | }; | 952 | }; |
953 | #endif | 953 | #endif |
954 | 954 | ||
955 | #if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE) | ||
956 | #include <linux/input.h> | ||
957 | #include <linux/i2c/adp5588_keys.h> | ||
958 | static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = { | ||
959 | [0] = KEY_GRAVE, | ||
960 | [1] = KEY_1, | ||
961 | [2] = KEY_2, | ||
962 | [3] = KEY_3, | ||
963 | [4] = KEY_4, | ||
964 | [5] = KEY_5, | ||
965 | [6] = KEY_6, | ||
966 | [7] = KEY_7, | ||
967 | [8] = KEY_8, | ||
968 | [9] = KEY_9, | ||
969 | [10] = KEY_0, | ||
970 | [11] = KEY_MINUS, | ||
971 | [12] = KEY_EQUAL, | ||
972 | [13] = KEY_BACKSLASH, | ||
973 | [15] = KEY_KP0, | ||
974 | [16] = KEY_Q, | ||
975 | [17] = KEY_W, | ||
976 | [18] = KEY_E, | ||
977 | [19] = KEY_R, | ||
978 | [20] = KEY_T, | ||
979 | [21] = KEY_Y, | ||
980 | [22] = KEY_U, | ||
981 | [23] = KEY_I, | ||
982 | [24] = KEY_O, | ||
983 | [25] = KEY_P, | ||
984 | [26] = KEY_LEFTBRACE, | ||
985 | [27] = KEY_RIGHTBRACE, | ||
986 | [29] = KEY_KP1, | ||
987 | [30] = KEY_KP2, | ||
988 | [31] = KEY_KP3, | ||
989 | [32] = KEY_A, | ||
990 | [33] = KEY_S, | ||
991 | [34] = KEY_D, | ||
992 | [35] = KEY_F, | ||
993 | [36] = KEY_G, | ||
994 | [37] = KEY_H, | ||
995 | [38] = KEY_J, | ||
996 | [39] = KEY_K, | ||
997 | [40] = KEY_L, | ||
998 | [41] = KEY_SEMICOLON, | ||
999 | [42] = KEY_APOSTROPHE, | ||
1000 | [43] = KEY_BACKSLASH, | ||
1001 | [45] = KEY_KP4, | ||
1002 | [46] = KEY_KP5, | ||
1003 | [47] = KEY_KP6, | ||
1004 | [48] = KEY_102ND, | ||
1005 | [49] = KEY_Z, | ||
1006 | [50] = KEY_X, | ||
1007 | [51] = KEY_C, | ||
1008 | [52] = KEY_V, | ||
1009 | [53] = KEY_B, | ||
1010 | [54] = KEY_N, | ||
1011 | [55] = KEY_M, | ||
1012 | [56] = KEY_COMMA, | ||
1013 | [57] = KEY_DOT, | ||
1014 | [58] = KEY_SLASH, | ||
1015 | [60] = KEY_KPDOT, | ||
1016 | [61] = KEY_KP7, | ||
1017 | [62] = KEY_KP8, | ||
1018 | [63] = KEY_KP9, | ||
1019 | [64] = KEY_SPACE, | ||
1020 | [65] = KEY_BACKSPACE, | ||
1021 | [66] = KEY_TAB, | ||
1022 | [67] = KEY_KPENTER, | ||
1023 | [68] = KEY_ENTER, | ||
1024 | [69] = KEY_ESC, | ||
1025 | [70] = KEY_DELETE, | ||
1026 | [74] = KEY_KPMINUS, | ||
1027 | [76] = KEY_UP, | ||
1028 | [77] = KEY_DOWN, | ||
1029 | [78] = KEY_RIGHT, | ||
1030 | [79] = KEY_LEFT, | ||
1031 | }; | ||
1032 | |||
1033 | static struct adp5588_kpad_platform_data adp5588_kpad_data = { | ||
1034 | .rows = 8, | ||
1035 | .cols = 10, | ||
1036 | .keymap = adp5588_keymap, | ||
1037 | .keymapsize = ARRAY_SIZE(adp5588_keymap), | ||
1038 | .repeat = 0, | ||
1039 | }; | ||
1040 | #endif | ||
1041 | |||
955 | #ifdef CONFIG_I2C_BOARDINFO | 1042 | #ifdef CONFIG_I2C_BOARDINFO |
956 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | 1043 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { |
957 | #if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE) | 1044 | #if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE) |
@@ -978,6 +1065,13 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
978 | .platform_data = (void *)&bfin_ad7879_ts_info, | 1065 | .platform_data = (void *)&bfin_ad7879_ts_info, |
979 | }, | 1066 | }, |
980 | #endif | 1067 | #endif |
1068 | #if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE) | ||
1069 | { | ||
1070 | I2C_BOARD_INFO("adp5588-keys", 0x34), | ||
1071 | .irq = IRQ_PG0, | ||
1072 | .platform_data = (void *)&adp5588_kpad_data, | ||
1073 | }, | ||
1074 | #endif | ||
981 | }; | 1075 | }; |
982 | #endif | 1076 | #endif |
983 | 1077 | ||