blob: 539b701527735e7c3f672e100353145e4139a36b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
/*
* Copyright (C) 2010 Motorola Mobility, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307, USA
*/
/* Defines generic platform structures for touch drivers */
#ifndef _LINUX_TOUCH_PLATFORM_H
#define _LINUX_TOUCH_PLATFORM_H
#include <linux/types.h>
/* platform related defines */
#define CY_I2C_NAME "cyttsp4-i2c"
#define CY_I2C_TCH_ADR 0x67
#define CY_I2C_LDR_ADR 0x69
struct touch_settings {
const uint8_t *data;
uint8_t size;
uint8_t tag;
} __packed;
struct touch_firmware {
const uint8_t *img;
uint32_t size;
const uint8_t *ver;
uint8_t vsize;
} __attribute__ ((packed));
struct touch_framework {
const uint16_t *abs;
uint8_t size;
uint8_t enable_vkeys;
} __packed;
struct touch_platform_data {
struct touch_settings *sett[256];
struct touch_firmware *fw;
struct touch_framework *frmwrk;
uint8_t addr[2];
uint16_t flags;
int (*hw_reset)(void);
int (*hw_recov)(int);
int (*irq_stat)(void);
} __packed;
#endif /* _LINUX_TOUCH_PLATFORM_H */
|