aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/input
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/input')
-rw-r--r--include/linux/input/cyttsp.h58
-rw-r--r--include/linux/input/ili210x.h10
-rw-r--r--include/linux/input/kxtj9.h11
-rw-r--r--include/linux/input/matrix_keypad.h19
-rw-r--r--include/linux/input/mt.h8
-rw-r--r--include/linux/input/ti_tscadc.h17
6 files changed, 111 insertions, 12 deletions
diff --git a/include/linux/input/cyttsp.h b/include/linux/input/cyttsp.h
new file mode 100644
index 000000000000..5af7c66f1fca
--- /dev/null
+++ b/include/linux/input/cyttsp.h
@@ -0,0 +1,58 @@
1/*
2 * Header file for:
3 * Cypress TrueTouch(TM) Standard Product (TTSP) touchscreen drivers.
4 * For use with Cypress Txx3xx parts.
5 * Supported parts include:
6 * CY8CTST341
7 * CY8CTMA340
8 *
9 * Copyright (C) 2009, 2010, 2011 Cypress Semiconductor, Inc.
10 * Copyright (C) 2012 Javier Martinez Canillas <javier@dowhile0.org>
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * version 2, and only version 2, as published by the
15 * Free Software Foundation.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 *
26 * Contact Cypress Semiconductor at www.cypress.com (kev@cypress.com)
27 *
28 */
29#ifndef _CYTTSP_H_
30#define _CYTTSP_H_
31
32#define CY_SPI_NAME "cyttsp-spi"
33#define CY_I2C_NAME "cyttsp-i2c"
34/* Active Power state scanning/processing refresh interval */
35#define CY_ACT_INTRVL_DFLT 0x00 /* ms */
36/* touch timeout for the Active power */
37#define CY_TCH_TMOUT_DFLT 0xFF /* ms */
38/* Low Power state scanning/processing refresh interval */
39#define CY_LP_INTRVL_DFLT 0x0A /* ms */
40/* Active distance in pixels for a gesture to be reported */
41#define CY_ACT_DIST_DFLT 0xF8 /* pixels */
42
43struct cyttsp_platform_data {
44 u32 maxx;
45 u32 maxy;
46 bool use_hndshk;
47 u8 act_dist; /* Active distance */
48 u8 act_intrvl; /* Active refresh interval; ms */
49 u8 tch_tmout; /* Active touch timeout; ms */
50 u8 lp_intrvl; /* Low power refresh interval; ms */
51 int (*init)(void);
52 void (*exit)(void);
53 char *name;
54 s16 irq_gpio;
55 u8 *bl_keys;
56};
57
58#endif /* _CYTTSP_H_ */
diff --git a/include/linux/input/ili210x.h b/include/linux/input/ili210x.h
new file mode 100644
index 000000000000..a5471245a13c
--- /dev/null
+++ b/include/linux/input/ili210x.h
@@ -0,0 +1,10 @@
1#ifndef _ILI210X_H
2#define _ILI210X_H
3
4struct ili210x_platform_data {
5 unsigned long irq_flags;
6 unsigned int poll_period;
7 bool (*get_pendown_state)(void);
8};
9
10#endif
diff --git a/include/linux/input/kxtj9.h b/include/linux/input/kxtj9.h
index f6bac89537b8..d415579b56fe 100644
--- a/include/linux/input/kxtj9.h
+++ b/include/linux/input/kxtj9.h
@@ -24,6 +24,7 @@
24 24
25struct kxtj9_platform_data { 25struct kxtj9_platform_data {
26 unsigned int min_interval; /* minimum poll interval (in milli-seconds) */ 26 unsigned int min_interval; /* minimum poll interval (in milli-seconds) */
27 unsigned int init_interval; /* initial poll interval (in milli-seconds) */
27 28
28 /* 29 /*
29 * By default, x is axis 0, y is axis 1, z is axis 2; these can be 30 * By default, x is axis 0, y is axis 1, z is axis 2; these can be
@@ -52,16 +53,6 @@ struct kxtj9_platform_data {
52 #define KXTJ9_G_8G (1 << 4) 53 #define KXTJ9_G_8G (1 << 4)
53 u8 g_range; 54 u8 g_range;
54 55
55 /* DATA_CTRL_REG: controls the output data rate of the part */
56 #define ODR12_5F 0
57 #define ODR25F 1
58 #define ODR50F 2
59 #define ODR100F 3
60 #define ODR200F 4
61 #define ODR400F 5
62 #define ODR800F 6
63 u8 data_odr_init;
64
65 int (*init)(void); 56 int (*init)(void);
66 void (*exit)(void); 57 void (*exit)(void);
67 int (*power_on)(void); 58 int (*power_on)(void);
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h
index fe7c4b9ae270..6c07ced0af81 100644
--- a/include/linux/input/matrix_keypad.h
+++ b/include/linux/input/matrix_keypad.h
@@ -3,6 +3,7 @@
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5#include <linux/input.h> 5#include <linux/input.h>
6#include <linux/of.h>
6 7
7#define MATRIX_MAX_ROWS 32 8#define MATRIX_MAX_ROWS 32
8#define MATRIX_MAX_COLS 32 9#define MATRIX_MAX_COLS 32
@@ -106,4 +107,22 @@ matrix_keypad_build_keymap(const struct matrix_keymap_data *keymap_data,
106 __clear_bit(KEY_RESERVED, keybit); 107 __clear_bit(KEY_RESERVED, keybit);
107} 108}
108 109
110#ifdef CONFIG_INPUT_OF_MATRIX_KEYMAP
111struct matrix_keymap_data *
112matrix_keyboard_of_fill_keymap(struct device_node *np, const char *propname);
113
114void matrix_keyboard_of_free_keymap(const struct matrix_keymap_data *kd);
115#else
116static inline struct matrix_keymap_data *
117matrix_keyboard_of_fill_keymap(struct device_node *np, const char *propname)
118{
119 return NULL;
120}
121
122static inline void
123matrix_keyboard_of_free_keymap(const struct matrix_keymap_data *kd)
124{
125}
126#endif
127
109#endif /* _MATRIX_KEYPAD_H */ 128#endif /* _MATRIX_KEYPAD_H */
diff --git a/include/linux/input/mt.h b/include/linux/input/mt.h
index 318bb82325a6..f86737586e19 100644
--- a/include/linux/input/mt.h
+++ b/include/linux/input/mt.h
@@ -48,10 +48,14 @@ static inline void input_mt_slot(struct input_dev *dev, int slot)
48 input_event(dev, EV_ABS, ABS_MT_SLOT, slot); 48 input_event(dev, EV_ABS, ABS_MT_SLOT, slot);
49} 49}
50 50
51static inline bool input_is_mt_value(int axis)
52{
53 return axis >= ABS_MT_FIRST && axis <= ABS_MT_LAST;
54}
55
51static inline bool input_is_mt_axis(int axis) 56static inline bool input_is_mt_axis(int axis)
52{ 57{
53 return axis == ABS_MT_SLOT || 58 return axis == ABS_MT_SLOT || input_is_mt_value(axis);
54 (axis >= ABS_MT_FIRST && axis <= ABS_MT_LAST);
55} 59}
56 60
57void input_mt_report_slot_state(struct input_dev *dev, 61void input_mt_report_slot_state(struct input_dev *dev,
diff --git a/include/linux/input/ti_tscadc.h b/include/linux/input/ti_tscadc.h
new file mode 100644
index 000000000000..b10a527a92a4
--- /dev/null
+++ b/include/linux/input/ti_tscadc.h
@@ -0,0 +1,17 @@
1#ifndef __LINUX_TI_TSCADC_H
2#define __LINUX_TI_TSCADC_H
3
4/**
5 * struct tsc_data Touchscreen wire configuration
6 * @wires: Wires refer to application modes
7 * i.e. 4/5/8 wire touchscreen support
8 * on the platform.
9 * @x_plate_resistance: X plate resistance.
10 */
11
12struct tsc_data {
13 int wires;
14 int x_plate_resistance;
15};
16
17#endif