|
29 | 29 | #include <linux/of.h>
|
30 | 30 | #include <asm/unaligned.h>
|
31 | 31 |
|
| 32 | +#define GOODIX_GPIO_INT_NAME "irq" |
| 33 | +#define GOODIX_GPIO_RST_NAME "reset" |
| 34 | + |
| 35 | +#define GOODIX_MAX_HEIGHT 4096 |
| 36 | +#define GOODIX_MAX_WIDTH 4096 |
| 37 | +#define GOODIX_INT_TRIGGER 1 |
| 38 | +#define GOODIX_CONTACT_SIZE 8 |
| 39 | +#define GOODIX_MAX_CONTACT_SIZE 9 |
| 40 | +#define GOODIX_MAX_CONTACTS 10 |
| 41 | + |
| 42 | +#define GOODIX_CONFIG_MAX_LENGTH 240 |
| 43 | +#define GOODIX_CONFIG_911_LENGTH 186 |
| 44 | +#define GOODIX_CONFIG_967_LENGTH 228 |
| 45 | + |
| 46 | +/* Register defines */ |
| 47 | +#define GOODIX_REG_COMMAND 0x8040 |
| 48 | +#define GOODIX_CMD_SCREEN_OFF 0x05 |
| 49 | + |
| 50 | +#define GOODIX_READ_COOR_ADDR 0x814E |
| 51 | +#define GOODIX_GT1X_REG_CONFIG_DATA 0x8050 |
| 52 | +#define GOODIX_GT9X_REG_CONFIG_DATA 0x8047 |
| 53 | +#define GOODIX_REG_ID 0x8140 |
| 54 | + |
| 55 | +#define GOODIX_BUFFER_STATUS_READY BIT(7) |
| 56 | +#define GOODIX_BUFFER_STATUS_TIMEOUT 20 |
| 57 | + |
| 58 | +#define RESOLUTION_LOC 1 |
| 59 | +#define MAX_CONTACTS_LOC 5 |
| 60 | +#define TRIGGER_LOC 6 |
| 61 | + |
32 | 62 | struct goodix_ts_data;
|
33 | 63 |
|
34 | 64 | enum goodix_irq_pin_access_method {
|
@@ -68,36 +98,6 @@ struct goodix_ts_data {
|
68 | 98 | unsigned int contact_size;
|
69 | 99 | };
|
70 | 100 |
|
71 |
| -#define GOODIX_GPIO_INT_NAME "irq" |
72 |
| -#define GOODIX_GPIO_RST_NAME "reset" |
73 |
| - |
74 |
| -#define GOODIX_MAX_HEIGHT 4096 |
75 |
| -#define GOODIX_MAX_WIDTH 4096 |
76 |
| -#define GOODIX_INT_TRIGGER 1 |
77 |
| -#define GOODIX_CONTACT_SIZE 8 |
78 |
| -#define GOODIX_MAX_CONTACT_SIZE 9 |
79 |
| -#define GOODIX_MAX_CONTACTS 10 |
80 |
| - |
81 |
| -#define GOODIX_CONFIG_MAX_LENGTH 240 |
82 |
| -#define GOODIX_CONFIG_911_LENGTH 186 |
83 |
| -#define GOODIX_CONFIG_967_LENGTH 228 |
84 |
| - |
85 |
| -/* Register defines */ |
86 |
| -#define GOODIX_REG_COMMAND 0x8040 |
87 |
| -#define GOODIX_CMD_SCREEN_OFF 0x05 |
88 |
| - |
89 |
| -#define GOODIX_READ_COOR_ADDR 0x814E |
90 |
| -#define GOODIX_GT1X_REG_CONFIG_DATA 0x8050 |
91 |
| -#define GOODIX_GT9X_REG_CONFIG_DATA 0x8047 |
92 |
| -#define GOODIX_REG_ID 0x8140 |
93 |
| - |
94 |
| -#define GOODIX_BUFFER_STATUS_READY BIT(7) |
95 |
| -#define GOODIX_BUFFER_STATUS_TIMEOUT 20 |
96 |
| - |
97 |
| -#define RESOLUTION_LOC 1 |
98 |
| -#define MAX_CONTACTS_LOC 5 |
99 |
| -#define TRIGGER_LOC 6 |
100 |
| - |
101 | 101 | static int goodix_check_cfg_8(struct goodix_ts_data *ts,
|
102 | 102 | const struct firmware *cfg);
|
103 | 103 | static int goodix_check_cfg_16(struct goodix_ts_data *ts,
|
|
0 commit comments