kernel: change debounce logic in the gpio-buttons driver
[openwrt/svn-archive/archive.git] / target / linux / generic-2.6 / files / include / linux / gpio_buttons.h
1 /*
2 * Definitions for the GPIO buttons interface driver
3 *
4 * Copyright (C) 2007-2010 Gabor Juhos <juhosg@openwrt.org>
5 *
6 * This file was based on: /include/linux/gpio_keys.h
7 * The original gpio_keys.h seems not to have a license.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 *
13 */
14
15 #ifndef _GPIO_BUTTONS_H_
16 #define _GPIO_BUTTONS_H_
17
18 struct gpio_button {
19 int gpio; /* GPIO line number */
20 int active_low;
21 char *desc; /* button description */
22 int type; /* input event type (EV_KEY, EV_SW) */
23 int code; /* input event code (KEY_*, SW_*) */
24 int threshold; /* count threshold */
25 };
26
27 struct gpio_buttons_platform_data {
28 struct gpio_button *buttons;
29 int nbuttons; /* number of buttons */
30 int poll_interval; /* polling interval */
31 };
32
33 #endif /* _GPIO_BUTTONS_H_ */