aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tca6416_keypad.h
diff options
context:
space:
mode:
authorSriramakrishnan Govindarajan <srk@ti.com>2010-05-04 02:47:12 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-05-04 02:50:42 -0400
commit30ba3ead05763b172acaa65ae1be71af2a878940 (patch)
treecbbcfb494df9f73705b66324ba419118ca3b792e /include/linux/tca6416_keypad.h
parent16b32e0c9eec1bb8d53deedcd9f4704a114d84bb (diff)
Input: add keypad driver for keys interfaced to TCA6416
This patch implements a simple Keypad driver that functions as an I2C client. It handles key press events for keys connected to TCA6416 I2C based IO expander. Signed-off-by: Sriramakrishnan <srk@ti.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'include/linux/tca6416_keypad.h')
-rw-r--r--include/linux/tca6416_keypad.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/include/linux/tca6416_keypad.h b/include/linux/tca6416_keypad.h
new file mode 100644
index 000000000000..7bd266f3525c
--- /dev/null
+++ b/include/linux/tca6416_keypad.h
@@ -0,0 +1,34 @@
1/*
2 * tca6416 keypad platform support
3 *
4 * Copyright (C) 2010 Texas Instruments
5 *
6 * Author: Sriramakrishnan <srk@ti.com>
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 version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef _TCA6416_KEYS_H
14#define _TCA6416_KEYS_H
15
16#include <linux/types.h>
17
18struct tca6416_button {
19 /* Configuration parameters */
20 int code; /* input event code (KEY_*, SW_*) */
21 int active_low;
22 int type; /* input event type (EV_KEY, EV_SW) */
23};
24
25struct tca6416_keys_platform_data {
26 struct tca6416_button *buttons;
27 int nbuttons;
28 unsigned int rep:1; /* enable input subsystem auto repeat */
29 uint16_t pinmask;
30 uint16_t invert;
31 int irq_is_gpio;
32 int use_polling; /* use polling if Interrupt is not connected*/
33};
34#endif