Skip to content

Commit 16bbe38

Browse files
committed
platform/x86: touchscreen_dmi: Correct min/max values for Chuwi Hi10 Pro (CWI529) tablet
The firmware distributed as part of the Windows and Android drivers uses significantly different min and max values for the x- and y-axis, compared to the EFI's embedded touchscreen firmware. The difference is large enough that e.g. typing on an onscreen keyboard results in the wrong "keys" getting pressed. Adjust the values to match those of the firmware distributed with the Windows and Android drivers (which is necessary for pen support) and put the EFI-fw version's min/max values in the new "silead,efi-fw-min-max" property. The silead driver will use these when it is using the EFI embedded firmware, so as to not regress functionality in that case. Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 761db35 commit 16bbe38

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

drivers/platform/x86/touchscreen_dmi.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,16 @@ static const struct ts_dmi_data chuwi_hi10_plus_data = {
124124
.properties = chuwi_hi10_plus_props,
125125
};
126126

127+
static const u32 chuwi_hi10_pro_efi_min_max[] = { 8, 1911, 8, 1271 };
128+
127129
static const struct property_entry chuwi_hi10_pro_props[] = {
128-
PROPERTY_ENTRY_U32("touchscreen-min-x", 8),
129-
PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
130-
PROPERTY_ENTRY_U32("touchscreen-size-x", 1912),
131-
PROPERTY_ENTRY_U32("touchscreen-size-y", 1272),
130+
PROPERTY_ENTRY_U32("touchscreen-min-x", 80),
131+
PROPERTY_ENTRY_U32("touchscreen-min-y", 26),
132+
PROPERTY_ENTRY_U32("touchscreen-size-x", 1962),
133+
PROPERTY_ENTRY_U32("touchscreen-size-y", 1254),
132134
PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
133135
PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10-pro.fw"),
136+
PROPERTY_ENTRY_U32_ARRAY("silead,efi-fw-min-max", chuwi_hi10_pro_efi_min_max),
134137
PROPERTY_ENTRY_U32("silead,max-fingers", 10),
135138
PROPERTY_ENTRY_BOOL("silead,home-button"),
136139
{ }

0 commit comments

Comments
 (0)