Skip to content

Commit 1dd5ddc

Browse files
STrusovdtor
authored andcommitted
Input: goodix - fix touch coordinates on Cube I15-TC
The touchscreen on the Cube I15-TC don't match the default display, with 0,0 touches being reported when touching at the top-right of the screen. Add a quirk to invert the x coordinate. Reported-and-tested-by: Arkadiy <[email protected]> Signed-off-by: Sergei A. Trusov <[email protected]> Reviewed-by: Bastien Nocera <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent c5ccf2a commit 1dd5ddc

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

drivers/input/touchscreen/goodix.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,22 @@ static const struct dmi_system_id nine_bytes_report[] = {
168168
{}
169169
};
170170

171+
/*
172+
* Those tablets have their x coordinate inverted
173+
*/
174+
static const struct dmi_system_id inverted_x_screen[] = {
175+
#if defined(CONFIG_DMI) && defined(CONFIG_X86)
176+
{
177+
.ident = "Cube I15-TC",
178+
.matches = {
179+
DMI_MATCH(DMI_SYS_VENDOR, "Cube"),
180+
DMI_MATCH(DMI_PRODUCT_NAME, "I15-TC")
181+
},
182+
},
183+
#endif
184+
{}
185+
};
186+
171187
/**
172188
* goodix_i2c_read - read data from a register of the i2c slave device.
173189
*
@@ -780,6 +796,12 @@ static int goodix_configure_dev(struct goodix_ts_data *ts)
780796
"Non-standard 9-bytes report format quirk\n");
781797
}
782798

799+
if (dmi_check_system(inverted_x_screen)) {
800+
ts->prop.invert_x = true;
801+
dev_dbg(&ts->client->dev,
802+
"Applying 'inverted x screen' quirk\n");
803+
}
804+
783805
error = input_mt_init_slots(ts->input_dev, ts->max_touch_num,
784806
INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED);
785807
if (error) {

0 commit comments

Comments
 (0)