1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 #ifndef _CYTTSP4_H_
16 #define _CYTTSP4_H_
17
18 #define CYTTSP4_MT_NAME "cyttsp4_mt"
19 #define CYTTSP4_I2C_NAME "cyttsp4_i2c_adapter"
20 #define CYTTSP4_SPI_NAME "cyttsp4_spi_adapter"
21
22 #define CY_TOUCH_SETTINGS_MAX 32
23
24 struct touch_framework {
25 const uint16_t *abs;
26 uint8_t size;
27 uint8_t enable_vkeys;
28 } __packed;
29
30 struct cyttsp4_mt_platform_data {
31 struct touch_framework *frmwrk;
32 unsigned short flags;
33 char const *inp_dev_name;
34 };
35
36 struct touch_settings {
37 const uint8_t *data;
38 uint32_t size;
39 uint8_t tag;
40 } __packed;
41
42 struct cyttsp4_core_platform_data {
43 int irq_gpio;
44 int rst_gpio;
45 int level_irq_udelay;
46 int (*xres)(struct cyttsp4_core_platform_data *pdata,
47 struct device *dev);
48 int (*init)(struct cyttsp4_core_platform_data *pdata,
49 int on, struct device *dev);
50 int (*power)(struct cyttsp4_core_platform_data *pdata,
51 int on, struct device *dev, atomic_t *ignore_irq);
52 int (*irq_stat)(struct cyttsp4_core_platform_data *pdata,
53 struct device *dev);
54 struct touch_settings *sett[CY_TOUCH_SETTINGS_MAX];
55 };
56
57 struct cyttsp4_platform_data {
58 struct cyttsp4_core_platform_data *core_pdata;
59 struct cyttsp4_mt_platform_data *mt_pdata;
60 };
61
62 #endif