1 #ifndef __LINUX_FT5X0X_TS_H__
2 #define __LINUX_FT5X0X_TS_H__
4 //#define CONFIG_SUPPORT_FTS_CTP_UPG
5 #define CONFIG_FTS_CUSTOME_ENV
7 #define CFG_DBG_DUMMY_INFO_SUPPORT 1 //output touch point information
8 #define CFG_DBG_FUCTION_INFO_SUPPORT 0 //output fouction name
9 #define CFG_DBG_INPUT_EVENT 0 //debug input event
12 #define CFG_MAX_POINT_NUM 0x5 //max touch points supported
13 #define CFG_NUMOFKEYS 0x4 //number of touch keys
15 #ifdef CONFIG_FTS_CUSTOME_ENV
16 #define SCREEN_MAX_X 1024
17 #define SCREEN_MAX_Y 600
19 #define SCREEN_MAX_X 800
20 #define SCREEN_MAX_Y 480
25 #define KEY_RELEASE 0x0
27 #define FT5X0X_NAME "laibao_touch"//"ft5x0x_ts"
32 #define I2C_CTPM_ADDRESS 0x70
34 typedef unsigned char FTS_BYTE;
35 typedef unsigned short FTS_WORD;
36 typedef unsigned int FTS_DWRD;
37 typedef unsigned char FTS_BOOL;
41 typedef struct _REPORT_FINGER_INFO_T
43 short ui2_id; /* ID information, from 0 to CFG_MAX_POINT_NUM - 1*/
44 short u2_pressure; /* ***pressure information, valid from 0 -63 **********/
45 short i2_x; /*********** X coordinate, 0 - 2047 ****************/
46 short i2_y; /* **********Y coordinate, 0 - 2047 ****************/
47 } REPORT_FINGER_INFO_T;
64 struct FTS_TS_EVENT_T {
83 struct FTS_TS_DATA_T {
84 struct input_dev *input_dev;
85 struct FTS_TS_EVENT_T event;
86 struct work_struct pen_event_work;
87 struct workqueue_struct *ts_workqueue;
93 FT5X0X_REG_THRES = 0x80, /* Thresshold, the threshold be low, the sensitivy will be high */
94 FT5X0X_REG_REPORT_RATE = 0x88, /* **************report rate, in unit of 10Hz **************/
95 FT5X0X_REG_PMODE = 0xA5, /* Power Consume Mode 0 -- active, 1 -- monitor, 3 -- sleep */
96 FT5X0X_REG_FIRMID = 0xA6, /* ***************firmware version **********************/
97 FT5X0X_REG_NOISE_MODE = 0xb2 /* to enable or disable power noise, 1 -- enable, 0 -- disable */
100 #define PMODE_ACTIVE 0x00
101 #define PMODE_MONITOR 0x01
102 #define PMODE_STANDBY 0x02
103 #define PMODE_HIBERNATE 0x03
106 #ifndef ABS_MT_TOUCH_MAJOR
107 #define ABS_MT_TOUCH_MAJOR 0x30 /* touching ellipse */
108 #define ABS_MT_TOUCH_MINOR 0x31 /* (omit if circular) */
109 #define ABS_MT_WIDTH_MAJOR 0x32 /* approaching ellipse */
110 #define ABS_MT_WIDTH_MINOR 0x33 /* (omit if circular) */
111 #define ABS_MT_ORIENTATION 0x34 /* Ellipse orientation */
112 #define ABS_MT_POSITION_X 0x35 /* Center X ellipse position */
113 #define ABS_MT_POSITION_Y 0x36 /* Center Y ellipse position */
114 #define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */
115 #define ABS_MT_BLOB_ID 0x38 /* Group set of pkts as blob */