Skip to content

Commit aebfc52

Browse files
jwrdegoededtor
authored andcommitted
Input: goodix - move defines to above struct goodix_ts_data declaration
Move the defines to above the struct goodix_ts_data declaration, so that the MAX defines can be used inside the struct goodix_ts_data declaration. No functional changes, just moving a block of code. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1786317 BugLink: nexus511/gpd-ubuntu-packages#10 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=199207 Reviewed-by: Bastien Nocera <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent c5fca48 commit aebfc52

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

drivers/input/touchscreen/goodix.c

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,36 @@
2929
#include <linux/of.h>
3030
#include <asm/unaligned.h>
3131

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+
3262
struct goodix_ts_data;
3363

3464
enum goodix_irq_pin_access_method {
@@ -68,36 +98,6 @@ struct goodix_ts_data {
6898
unsigned int contact_size;
6999
};
70100

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-
101101
static int goodix_check_cfg_8(struct goodix_ts_data *ts,
102102
const struct firmware *cfg);
103103
static int goodix_check_cfg_16(struct goodix_ts_data *ts,

0 commit comments

Comments
 (0)