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 <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211225120247.95380-1-hdegoede@redhat.com
This commit is contained in:
Hans de Goede 2021-12-25 13:02:46 +01:00
parent 761db353d9
commit 16bbe382bb

View File

@ -124,13 +124,16 @@ static const struct ts_dmi_data chuwi_hi10_plus_data = {
.properties = chuwi_hi10_plus_props,
};
static const u32 chuwi_hi10_pro_efi_min_max[] = { 8, 1911, 8, 1271 };
static const struct property_entry chuwi_hi10_pro_props[] = {
PROPERTY_ENTRY_U32("touchscreen-min-x", 8),
PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
PROPERTY_ENTRY_U32("touchscreen-size-x", 1912),
PROPERTY_ENTRY_U32("touchscreen-size-y", 1272),
PROPERTY_ENTRY_U32("touchscreen-min-x", 80),
PROPERTY_ENTRY_U32("touchscreen-min-y", 26),
PROPERTY_ENTRY_U32("touchscreen-size-x", 1962),
PROPERTY_ENTRY_U32("touchscreen-size-y", 1254),
PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10-pro.fw"),
PROPERTY_ENTRY_U32_ARRAY("silead,efi-fw-min-max", chuwi_hi10_pro_efi_min_max),
PROPERTY_ENTRY_U32("silead,max-fingers", 10),
PROPERTY_ENTRY_BOOL("silead,home-button"),
{ }