Skip to content

Commit f0ddb8a

Browse files
committed
platform/x86: touchscreen_dmi: Consolidate Goodix upside-down touchscreen data
Now that prefix matches for ACPI names are supported, the ts_dmi_data structs for "GDIX1001:00" and "GDIX1001:01" can be consolidated into a single match matching on "GDIX1001". For consistency also change gdix1002_00_upside_down_data to match. Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20240212120608.30469-2-hdegoede@redhat.com
1 parent dbcbfd6 commit f0ddb8a

1 file changed

Lines changed: 10 additions & 15 deletions

File tree

drivers/platform/x86/touchscreen_dmi.c

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -415,18 +415,13 @@ static const struct property_entry gdix1001_upside_down_props[] = {
415415
{ }
416416
};
417417

418-
static const struct ts_dmi_data gdix1001_00_upside_down_data = {
419-
.acpi_name = "GDIX1001:00",
420-
.properties = gdix1001_upside_down_props,
421-
};
422-
423-
static const struct ts_dmi_data gdix1001_01_upside_down_data = {
424-
.acpi_name = "GDIX1001:01",
418+
static const struct ts_dmi_data gdix1001_upside_down_data = {
419+
.acpi_name = "GDIX1001",
425420
.properties = gdix1001_upside_down_props,
426421
};
427422

428-
static const struct ts_dmi_data gdix1002_00_upside_down_data = {
429-
.acpi_name = "GDIX1002:00",
423+
static const struct ts_dmi_data gdix1002_upside_down_data = {
424+
.acpi_name = "GDIX1002",
430425
.properties = gdix1001_upside_down_props,
431426
};
432427

@@ -1412,7 +1407,7 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
14121407
},
14131408
{
14141409
/* Juno Tablet */
1415-
.driver_data = (void *)&gdix1002_00_upside_down_data,
1410+
.driver_data = (void *)&gdix1002_upside_down_data,
14161411
.matches = {
14171412
DMI_MATCH(DMI_SYS_VENDOR, "Default string"),
14181413
/* Both product- and board-name being "Default string" is somewhat rare */
@@ -1658,15 +1653,15 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
16581653
},
16591654
{
16601655
/* Teclast X89 (Android version / BIOS) */
1661-
.driver_data = (void *)&gdix1001_00_upside_down_data,
1656+
.driver_data = (void *)&gdix1001_upside_down_data,
16621657
.matches = {
16631658
DMI_MATCH(DMI_BOARD_VENDOR, "WISKY"),
16641659
DMI_MATCH(DMI_BOARD_NAME, "3G062i"),
16651660
},
16661661
},
16671662
{
16681663
/* Teclast X89 (Windows version / BIOS) */
1669-
.driver_data = (void *)&gdix1001_01_upside_down_data,
1664+
.driver_data = (void *)&gdix1001_upside_down_data,
16701665
.matches = {
16711666
/* tPAD is too generic, also match on bios date */
16721667
DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"),
@@ -1684,7 +1679,7 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
16841679
},
16851680
{
16861681
/* Teclast X98 Pro */
1687-
.driver_data = (void *)&gdix1001_00_upside_down_data,
1682+
.driver_data = (void *)&gdix1001_upside_down_data,
16881683
.matches = {
16891684
/*
16901685
* Only match BIOS date, because the manufacturers
@@ -1788,15 +1783,15 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
17881783
},
17891784
{
17901785
/* "WinBook TW100" */
1791-
.driver_data = (void *)&gdix1001_00_upside_down_data,
1786+
.driver_data = (void *)&gdix1001_upside_down_data,
17921787
.matches = {
17931788
DMI_MATCH(DMI_SYS_VENDOR, "WinBook"),
17941789
DMI_MATCH(DMI_PRODUCT_NAME, "TW100")
17951790
}
17961791
},
17971792
{
17981793
/* WinBook TW700 */
1799-
.driver_data = (void *)&gdix1001_00_upside_down_data,
1794+
.driver_data = (void *)&gdix1001_upside_down_data,
18001795
.matches = {
18011796
DMI_MATCH(DMI_SYS_VENDOR, "WinBook"),
18021797
DMI_MATCH(DMI_PRODUCT_NAME, "TW700")

0 commit comments

Comments
 (0)