Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

kernel: Commit

kernel


Commit MetaInfo

Revision69d201a837884f67401e2e0046817b5ede78ca7f (tree)
Time2019-03-08 15:17:14
AuthorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

Input: goodix - invert x axis on Microtech e-tab Pro

The touchscreen on Microtech e-tab Pro has inverted x axis.
Apply a quirk similar to commit 8b5a359c.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>

Change Summary

Incremental Difference

--- a/drivers/input/touchscreen/goodix.c
+++ b/drivers/input/touchscreen/goodix.c
@@ -145,6 +145,19 @@ static const struct dmi_system_id rotated_screen[] = {
145145 {}
146146 };
147147
148+static const struct dmi_system_id x_inverted[] = {
149+#if defined(CONFIG_DMI) && defined(CONFIG_X86)
150+ {
151+ .ident = "Microtech e-tab Pro",
152+ .matches = {
153+ DMI_MATCH(DMI_SYS_VENDOR, "Microtech"),
154+ DMI_MATCH(DMI_PRODUCT_NAME, "e-tab Pro")
155+ }
156+ },
157+#endif
158+ {}
159+};
160+
148161 /**
149162 * goodix_i2c_read - read data from a register of the i2c slave device.
150163 *
@@ -707,6 +720,9 @@ static int goodix_configure_dev(struct goodix_ts_data *ts)
707720 ts->prop.invert_y = true;
708721 dev_dbg(&ts->client->dev,
709722 "Applying '180 degrees rotated screen' quirk\n");
723+ } else if (dmi_check_system(x_inverted)) {
724+ ts->prop.invert_x = true;
725+ dev_err(&ts->client->dev, "Applying 'invert x axis' quirk\n");
710726 }
711727
712728 error = input_mt_init_slots(ts->input_dev, ts->max_touch_num,
Show on old repository browser