Commit 1dd5ddc1 authored by Sergei A. Trusov's avatar Sergei A. Trusov Committed by Dmitry Torokhov

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: default avatarArkadiy <arkan49@yandex.ru>
Signed-off-by: default avatarSergei A. Trusov <sergei.a.trusov@ya.ru>
Reviewed-by: default avatarBastien Nocera <hadess@hadess.net>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent c5ccf2ad
...@@ -168,6 +168,22 @@ static const struct dmi_system_id nine_bytes_report[] = { ...@@ -168,6 +168,22 @@ static const struct dmi_system_id nine_bytes_report[] = {
{} {}
}; };
/*
* Those tablets have their x coordinate inverted
*/
static const struct dmi_system_id inverted_x_screen[] = {
#if defined(CONFIG_DMI) && defined(CONFIG_X86)
{
.ident = "Cube I15-TC",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Cube"),
DMI_MATCH(DMI_PRODUCT_NAME, "I15-TC")
},
},
#endif
{}
};
/** /**
* goodix_i2c_read - read data from a register of the i2c slave device. * goodix_i2c_read - read data from a register of the i2c slave device.
* *
...@@ -780,6 +796,12 @@ static int goodix_configure_dev(struct goodix_ts_data *ts) ...@@ -780,6 +796,12 @@ static int goodix_configure_dev(struct goodix_ts_data *ts)
"Non-standard 9-bytes report format quirk\n"); "Non-standard 9-bytes report format quirk\n");
} }
if (dmi_check_system(inverted_x_screen)) {
ts->prop.invert_x = true;
dev_dbg(&ts->client->dev,
"Applying 'inverted x screen' quirk\n");
}
error = input_mt_init_slots(ts->input_dev, ts->max_touch_num, error = input_mt_init_slots(ts->input_dev, ts->max_touch_num,
INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED); INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED);
if (error) { if (error) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment