kernel
Revision | 69d201a837884f67401e2e0046817b5ede78ca7f (tree) |
---|---|
Time | 2019-03-08 15:17:14 |
Author | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
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>
@@ -145,6 +145,19 @@ static const struct dmi_system_id rotated_screen[] = { | ||
145 | 145 | {} |
146 | 146 | }; |
147 | 147 | |
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 | + | |
148 | 161 | /** |
149 | 162 | * goodix_i2c_read - read data from a register of the i2c slave device. |
150 | 163 | * |
@@ -707,6 +720,9 @@ static int goodix_configure_dev(struct goodix_ts_data *ts) | ||
707 | 720 | ts->prop.invert_y = true; |
708 | 721 | dev_dbg(&ts->client->dev, |
709 | 722 | "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"); | |
710 | 726 | } |
711 | 727 | |
712 | 728 | error = input_mt_init_slots(ts->input_dev, ts->max_touch_num, |