diff options
Diffstat (limited to 'include/linux/interrupt_keys.h')
-rw-r--r-- | include/linux/interrupt_keys.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/include/linux/interrupt_keys.h b/include/linux/interrupt_keys.h new file mode 100644 index 00000000000..8be6e9a6b0a --- /dev/null +++ b/include/linux/interrupt_keys.h | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * include/linux/interrupt_keys.h | ||
3 | * | ||
4 | * Key driver for keys directly connected to intrrupt lines. | ||
5 | * | ||
6 | * Copyright (c) 2011, NVIDIA Corporation. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
14 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
15 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
16 | * more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License along | ||
19 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
21 | */ | ||
22 | |||
23 | #ifndef _INTERRUPT_KEYS_H | ||
24 | #define _INTERRUPT_KEYS_H | ||
25 | |||
26 | struct interrupt_keys_button { | ||
27 | /* Configuration parameters */ | ||
28 | int code; /* input event code (KEY_*, SW_*) */ | ||
29 | int irq; | ||
30 | int active_low; | ||
31 | char *desc; | ||
32 | int type; /* input event type (EV_KEY, EV_SW) */ | ||
33 | int wakeup; /* configure the interrupt source as a wake-up | ||
34 | * source */ | ||
35 | int debounce_interval; /* debounce ticks interval in msecs */ | ||
36 | bool can_disable; | ||
37 | }; | ||
38 | |||
39 | struct interrupt_keys_platform_data { | ||
40 | struct interrupt_keys_button *int_buttons; | ||
41 | int nbuttons; | ||
42 | unsigned int rep:1; /* enable input subsystem auto repeat */ | ||
43 | int (*enable)(struct device *dev); | ||
44 | void (*disable)(struct device *dev); | ||
45 | }; | ||
46 | |||
47 | #endif | ||