diff options
Diffstat (limited to 'arch/arm/mach-tegra/include/mach/kbc.h')
-rw-r--r-- | arch/arm/mach-tegra/include/mach/kbc.h | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/include/mach/kbc.h b/arch/arm/mach-tegra/include/mach/kbc.h new file mode 100644 index 00000000000..7b68baa04f1 --- /dev/null +++ b/arch/arm/mach-tegra/include/mach/kbc.h | |||
@@ -0,0 +1,86 @@ | |||
1 | /* | ||
2 | * Platform definitions for tegra-kbc keyboard input driver | ||
3 | * | ||
4 | * Copyright (c) 2010-2011, NVIDIA Corporation. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
14 | * more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef ASMARM_ARCH_TEGRA_KBC_H | ||
22 | #define ASMARM_ARCH_TEGRA_KBC_H | ||
23 | |||
24 | #include <linux/types.h> | ||
25 | #include <linux/input/matrix_keypad.h> | ||
26 | |||
27 | #define KBC_MAX_GPIO 24 | ||
28 | #define KBC_MAX_KPENT 8 | ||
29 | |||
30 | #define KBC_MAX_ROW 16 | ||
31 | #define KBC_MAX_COL 8 | ||
32 | #define KBC_MAX_KEY (KBC_MAX_ROW * KBC_MAX_COL) | ||
33 | |||
34 | #define KBC_PIN_GPIO_0 0 | ||
35 | #define KBC_PIN_GPIO_1 1 | ||
36 | #define KBC_PIN_GPIO_2 2 | ||
37 | #define KBC_PIN_GPIO_3 3 | ||
38 | #define KBC_PIN_GPIO_4 4 | ||
39 | #define KBC_PIN_GPIO_5 5 | ||
40 | #define KBC_PIN_GPIO_6 6 | ||
41 | #define KBC_PIN_GPIO_7 7 | ||
42 | #define KBC_PIN_GPIO_8 8 | ||
43 | #define KBC_PIN_GPIO_9 9 | ||
44 | #define KBC_PIN_GPIO_10 10 | ||
45 | #define KBC_PIN_GPIO_11 11 | ||
46 | #define KBC_PIN_GPIO_12 12 | ||
47 | #define KBC_PIN_GPIO_13 13 | ||
48 | #define KBC_PIN_GPIO_14 14 | ||
49 | #define KBC_PIN_GPIO_15 15 | ||
50 | #define KBC_PIN_GPIO_16 16 | ||
51 | #define KBC_PIN_GPIO_17 17 | ||
52 | #define KBC_PIN_GPIO_18 18 | ||
53 | #define KBC_PIN_GPIO_19 19 | ||
54 | #define KBC_PIN_GPIO_20 20 | ||
55 | #define KBC_PIN_GPIO_21 21 | ||
56 | #define KBC_PIN_GPIO_22 22 | ||
57 | #define KBC_PIN_GPIO_23 23 | ||
58 | |||
59 | struct tegra_kbc_pin_cfg { | ||
60 | bool is_row; | ||
61 | bool en; | ||
62 | unsigned char num; | ||
63 | }; | ||
64 | |||
65 | struct tegra_kbc_wake_key { | ||
66 | u8 row:4; | ||
67 | u8 col:4; | ||
68 | }; | ||
69 | |||
70 | struct tegra_kbc_platform_data { | ||
71 | unsigned int debounce_cnt; | ||
72 | unsigned int repeat_cnt; | ||
73 | unsigned int scan_count; | ||
74 | |||
75 | unsigned int wake_cnt; /* 0:wake on any key >1:wake on wake_cfg */ | ||
76 | const struct tegra_kbc_wake_key *wake_cfg; | ||
77 | |||
78 | struct tegra_kbc_pin_cfg pin_cfg[KBC_MAX_GPIO]; | ||
79 | const struct matrix_keymap_data *keymap_data; | ||
80 | |||
81 | bool wakeup; | ||
82 | bool use_fn_map; | ||
83 | bool use_ghost_filter; | ||
84 | bool disable_ev_rep; | ||
85 | }; | ||
86 | #endif | ||