1 /*---------------------------------------------------------------------------------------------------------
2 * kernel/include/linux/goodix_touch.h
4 * Copyright(c) 2010 Goodix Technology Corp. All rights reserved.
8 *---------------------------------------------------------------------------------------------------------*/
10 #ifndef _LINUX_GOODIX_TOUCH_H
11 #define _LINUX_GOODIX_TOUCH_H
13 #include <linux/earlysuspend.h>
14 #include <linux/hrtimer.h>
15 #include <linux/i2c.h>
16 #include <linux/input.h>
18 #define GOODIX_I2C_NAME "goodix-ts"
21 #define TOUCH_MAX_HEIGHT 7680
22 #define TOUCH_MAX_WIDTH 5120
23 //显示屏的分辨率,根据具体平台更改,与触摸屏映射坐标相关
24 #define SCREEN_MAX_HEIGHT 1024
25 #define SCREEN_MAX_WIDTH 600
27 //#define SHUTDOWN_PORT RK29_PIN4_PD5 //SHUTDOWN管脚号
28 //#define INT_PORT RK29_PIN0_PA2 //Int IO port
32 #define TS_INT gpio_to_irq(INT_PORT) //Interrupt Number,EINT18 as 119
33 //#define INT_CFG S3C_GPIO_SFN(3) //IO configer,EINT type
42 #define GOODIX_MULTI_TOUCH
43 #ifndef GOODIX_MULTI_TOUCH
44 #define MAX_FINGER_NUM 1
46 #define MAX_FINGER_NUM 2 //最大支持手指数(<=5)
48 #undef GOODIX_TS_DEBUG
50 #define gt80xy_swap(x, y) do { typeof(x) z = x; x = y; y = z; } while (0)
52 struct goodix_ts_data {
54 struct i2c_client *client;
55 struct input_dev *input_dev;
59 struct work_struct work;
64 struct early_suspend early_suspend;
65 int (*power)(struct goodix_ts_data * ts, int on);
68 struct goodix_i2c_rmi_platform_data {
69 uint32_t version; /* Use this entry for panels with */
73 unsigned shutdown_pin;
77 #endif /* _LINUX_GOODIX_TOUCH_H */