aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data/cyttsp4.h
diff options
context:
space:
mode:
authorFerruh Yigit <fery@cypress.com>2013-06-30 21:49:02 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-07-01 00:24:21 -0400
commit17fb1563d69b63fe7a79570fe870cf7e530cd2cd (patch)
treedd780a3bc5fd27a5c728030a0ed035b6ede25eb2 /include/linux/platform_data/cyttsp4.h
parent9664877ed8956b81feb3bd6b3b2621b5fcdb624f (diff)
Input: cyttsp4 - add core driver for Cypress TMA4XX touchscreen devices
Cypress TrueTouch(tm) Standard Product controllers, Generetion4 devices, Core driver. Core driver is interface between host and TTSP controller and processes data sent by controller. Responsibilities of module are IRQ handling, reading system information registers and sending multi-touch protocol type B events. Signed-off-by: Ferruh Yigit <fery@cypress.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Javier Martinez Canillas <javier@dowhile0.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'include/linux/platform_data/cyttsp4.h')
-rw-r--r--include/linux/platform_data/cyttsp4.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/include/linux/platform_data/cyttsp4.h b/include/linux/platform_data/cyttsp4.h
new file mode 100644
index 000000000000..6eba54aff1dc
--- /dev/null
+++ b/include/linux/platform_data/cyttsp4.h
@@ -0,0 +1,76 @@
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 _CYTTSP4_H_
30#define _CYTTSP4_H_
31
32#define CYTTSP4_MT_NAME "cyttsp4_mt"
33#define CYTTSP4_I2C_NAME "cyttsp4_i2c_adapter"
34#define CYTTSP4_SPI_NAME "cyttsp4_spi_adapter"
35
36#define CY_TOUCH_SETTINGS_MAX 32
37
38struct touch_framework {
39 const uint16_t *abs;
40 uint8_t size;
41 uint8_t enable_vkeys;
42} __packed;
43
44struct cyttsp4_mt_platform_data {
45 struct touch_framework *frmwrk;
46 unsigned short flags;
47 char const *inp_dev_name;
48};
49
50struct touch_settings {
51 const uint8_t *data;
52 uint32_t size;
53 uint8_t tag;
54} __packed;
55
56struct cyttsp4_core_platform_data {
57 int irq_gpio;
58 int rst_gpio;
59 int level_irq_udelay;
60 int (*xres)(struct cyttsp4_core_platform_data *pdata,
61 struct device *dev);
62 int (*init)(struct cyttsp4_core_platform_data *pdata,
63 int on, struct device *dev);
64 int (*power)(struct cyttsp4_core_platform_data *pdata,
65 int on, struct device *dev, atomic_t *ignore_irq);
66 int (*irq_stat)(struct cyttsp4_core_platform_data *pdata,
67 struct device *dev);
68 struct touch_settings *sett[CY_TOUCH_SETTINGS_MAX];
69};
70
71struct cyttsp4_platform_data {
72 struct cyttsp4_core_platform_data *core_pdata;
73 struct cyttsp4_mt_platform_data *mt_pdata;
74};
75
76#endif /* _CYTTSP4_H_ */