Skip to content

Commit 4104916

Browse files
jwrdegoedeandy-shev
authored andcommitted
platform/x86: touchscreen_dmi: Add min-x and min-y settings for various models
Add min-x and min-y settings now that we've support for this and for some models also update the width/height settings with slighly more accurate values. This fixes touches along the edges registering at the wrong coordinates. While at it also set max-fingers to 10 in a couple of cases where the touchpad can handle 10 fingers (rather then the default 5) and that was missing. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
1 parent 01b6b7e commit 4104916

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

drivers/platform/x86/touchscreen_dmi.c

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,13 @@ static const struct ts_dmi_data chuwi_hi8_data = {
4242
};
4343

4444
static const struct property_entry chuwi_hi8_pro_props[] = {
45+
PROPERTY_ENTRY_U32("touchscreen-min-x", 6),
46+
PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
4547
PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
4648
PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
4749
PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
4850
PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-hi8-pro.fw"),
51+
PROPERTY_ENTRY_U32("silead,max-fingers", 10),
4952
PROPERTY_ENTRY_BOOL("silead,home-button"),
5053
{ }
5154
};
@@ -56,6 +59,8 @@ static const struct ts_dmi_data chuwi_hi8_pro_data = {
5659
};
5760

5861
static const struct property_entry chuwi_vi8_props[] = {
62+
PROPERTY_ENTRY_U32("touchscreen-min-x", 4),
63+
PROPERTY_ENTRY_U32("touchscreen-min-y", 6),
5964
PROPERTY_ENTRY_U32("touchscreen-size-x", 1724),
6065
PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
6166
PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
@@ -88,9 +93,9 @@ static const struct ts_dmi_data chuwi_vi10_data = {
8893

8994
static const struct property_entry connect_tablet9_props[] = {
9095
PROPERTY_ENTRY_U32("touchscreen-min-x", 9),
91-
PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
96+
PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
9297
PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
93-
PROPERTY_ENTRY_U32("touchscreen-size-y", 878),
98+
PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
9499
PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
95100
PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
96101
PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-connect-tablet9.fw"),
@@ -104,8 +109,10 @@ static const struct ts_dmi_data connect_tablet9_data = {
104109
};
105110

106111
static const struct property_entry cube_iwork8_air_props[] = {
107-
PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
108-
PROPERTY_ENTRY_U32("touchscreen-size-y", 900),
112+
PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
113+
PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
114+
PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
115+
PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
109116
PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
110117
PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-cube-iwork8-air.fw"),
111118
PROPERTY_ENTRY_U32("silead,max-fingers", 10),
@@ -179,11 +186,14 @@ static const struct ts_dmi_data gp_electronic_t701_data = {
179186
};
180187

181188
static const struct property_entry itworks_tw891_props[] = {
189+
PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
190+
PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
182191
PROPERTY_ENTRY_U32("touchscreen-size-x", 1600),
183-
PROPERTY_ENTRY_U32("touchscreen-size-y", 890),
192+
PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
184193
PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
185194
PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
186195
PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-itworks-tw891.fw"),
196+
PROPERTY_ENTRY_U32("silead,max-fingers", 10),
187197
{ }
188198
};
189199

@@ -207,8 +217,10 @@ static const struct ts_dmi_data jumper_ezpad_6_pro_data = {
207217
};
208218

209219
static const struct property_entry jumper_ezpad_mini3_props[] = {
220+
PROPERTY_ENTRY_U32("touchscreen-min-x", 23),
221+
PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
210222
PROPERTY_ENTRY_U32("touchscreen-size-x", 1700),
211-
PROPERTY_ENTRY_U32("touchscreen-size-y", 1150),
223+
PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
212224
PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
213225
PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-jumper-ezpad-mini3.fw"),
214226
PROPERTY_ENTRY_U32("silead,max-fingers", 10),
@@ -340,11 +352,14 @@ static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data = {
340352
};
341353

342354
static const struct property_entry pov_mobii_wintab_p800w_v21_props[] = {
343-
PROPERTY_ENTRY_U32("touchscreen-size-x", 1800),
344-
PROPERTY_ENTRY_U32("touchscreen-size-y", 1150),
355+
PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
356+
PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
357+
PROPERTY_ENTRY_U32("touchscreen-size-x", 1794),
358+
PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
345359
PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
346360
PROPERTY_ENTRY_STRING("firmware-name",
347361
"gsl3692-pov-mobii-wintab-p800w.fw"),
362+
PROPERTY_ENTRY_U32("silead,max-fingers", 10),
348363
PROPERTY_ENTRY_BOOL("silead,home-button"),
349364
{ }
350365
};
@@ -447,6 +462,8 @@ static const struct ts_dmi_data trekstor_surftab_twin_10_1_data = {
447462
};
448463

449464
static const struct property_entry trekstor_surftab_wintron70_props[] = {
465+
PROPERTY_ENTRY_U32("touchscreen-min-x", 12),
466+
PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
450467
PROPERTY_ENTRY_U32("touchscreen-size-x", 884),
451468
PROPERTY_ENTRY_U32("touchscreen-size-y", 632),
452469
PROPERTY_ENTRY_STRING("firmware-name",

0 commit comments

Comments
 (0)