bluetooth: rfkill-bt: enalbe 32K for ap6356
[firefly-linux-kernel-4.4.55.git] / include / linux / goodix_touch.h
1 /*---------------------------------------------------------------------------------------------------------
2  * kernel/include/linux/goodix_touch.h
3  *
4  * Copyright(c) 2010 Goodix Technology Corp. All rights reserved.      
5  * Author: Eltonny
6  * Date: 2010.11.11                                    
7  *                                                                                                         
8  *---------------------------------------------------------------------------------------------------------*/
9
10 #ifndef         _LINUX_GOODIX_TOUCH_H
11 #define         _LINUX_GOODIX_TOUCH_H
12
13 #include <linux/earlysuspend.h>
14 #include <linux/hrtimer.h>
15 #include <linux/i2c.h>
16 #include <linux/input.h>
17
18 #define GOODIX_I2C_NAME "goodix-ts"
19 #define GUITAR_GT80X
20 //触摸屏的分辨率
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
26
27 //#define SHUTDOWN_PORT         RK29_PIN4_PD5                   //SHUTDOWN管脚号
28 //#define INT_PORT              RK29_PIN0_PA2                   //Int IO port
29
30 #if 0
31 #ifdef INT_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
34 #else
35         #define TS_INT  0
36 #endif
37 #endif
38
39 #define FLAG_UP         0
40 #define FLAG_DOWN       1
41
42 #define GOODIX_MULTI_TOUCH
43 #ifndef GOODIX_MULTI_TOUCH
44         #define MAX_FINGER_NUM 1
45 #else
46         #define MAX_FINGER_NUM 2                                        //最大支持手指数(<=5)
47 #endif
48 #undef GOODIX_TS_DEBUG
49
50 #define gt80xy_swap(x, y) do { typeof(x) z = x; x = y; y = z; } while (0)
51
52 struct goodix_ts_data {
53         uint16_t addr;
54         struct i2c_client *client;
55         struct input_dev *input_dev;
56         uint8_t use_irq;
57         uint8_t use_shutdown;
58         struct hrtimer timer;
59         struct work_struct  work;
60         char phys[32];
61         int bad_data;
62         int retry;
63
64         struct early_suspend early_suspend;
65         int (*power)(struct goodix_ts_data * ts, int on);
66 };
67
68 struct goodix_i2c_rmi_platform_data {
69         uint32_t version;       /* Use this entry for panels with */
70         //该结构体用于管理设备平台资源
71         //预留,用于之后的功能扩展
72
73         unsigned shutdown_pin;
74         unsigned irq_pin;
75 };
76
77 #endif /* _LINUX_GOODIX_TOUCH_H */