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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
/*
* include/linux/mms144.h - platform data structure for MCS Series sensor
*
* Copyright (C) 2010 Melfas, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* 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.
*
*/
#ifndef _LINUX_MELFAS_TS_H
#define _LINUX_MELFAS_TS_H
#define MELFAS_TS_NAME "melfas_ts"
#define MELFAS_DEV_ADDR 0x48
extern struct class *sec_class;
struct melfas_mms_platform_data {
int max_x;
int max_y;
bool invert_x;
bool invert_y;
int gpio_int;
int gpio_sda;
int gpio_scl;
int (*power) (int on);
int (*mux_fw_flash) (bool to_gpios);
int (*is_vdd_on) (void);
void (*input_event) (void *data);
void (*register_cb) (void *);
};
enum eISCRet_t {
ISC_NONE = -1,
ISC_SUCCESS = 0,
ISC_FILE_OPEN_ERROR,
ISC_FILE_CLOSE_ERROR,
ISC_FILE_FORMAT_ERROR,
ISC_WRITE_BUFFER_ERROR,
ISC_I2C_ERROR,
ISC_UPDATE_MODE_ENTER_ERROR,
ISC_CRC_ERROR,
ISC_VALIDATION_ERROR,
ISC_COMPATIVILITY_ERROR,
ISC_UPDATE_SECTION_ERROR,
ISC_SLAVE_ERASE_ERROR,
ISC_SLAVE_DOWNLOAD_ERROR,
ISC_DOWNLOAD_WHEN_SLAVE_IS_UPDATED_ERROR,
ISC_INITIAL_PACKET_ERROR,
ISC_NO_NEED_UPDATE_ERROR,
ISC_LIMIT
};
enum eSectionType_t {
SEC_NONE = -1,
SEC_BOOTLOADER = 0,
SEC_CORE,
SEC_PRIVATE_CONFIG,
SEC_PUBLIC_CONFIG,
SEC_LIMIT
};
struct tISCFWInfo_t {
unsigned char version;
unsigned char compatible_version;
unsigned char start_addr;
unsigned char end_addr;
};
#endif /* _LINUX_MELFAS_TS_H */
|