]> git.itanic.dy.fi Git - linux-stable/commitdiff
platform/x86: touchscreen_dmi: Consolidate Goodix upside-down touchscreen data
authorHans de Goede <hdegoede@redhat.com>
Mon, 12 Feb 2024 12:06:08 +0000 (13:06 +0100)
committerHans de Goede <hdegoede@redhat.com>
Mon, 19 Feb 2024 11:42:58 +0000 (12:42 +0100)
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
drivers/platform/x86/touchscreen_dmi.c

index 969477c83e56e3252078502748d78a1bf843fc17..975cf24ae359a882974f35762894108d4a117fb8 100644 (file)
@@ -415,18 +415,13 @@ static const struct property_entry gdix1001_upside_down_props[] = {
        { }
 };
 
-static const struct ts_dmi_data gdix1001_00_upside_down_data = {
-       .acpi_name      = "GDIX1001:00",
-       .properties     = gdix1001_upside_down_props,
-};
-
-static const struct ts_dmi_data gdix1001_01_upside_down_data = {
-       .acpi_name      = "GDIX1001:01",
+static const struct ts_dmi_data gdix1001_upside_down_data = {
+       .acpi_name      = "GDIX1001",
        .properties     = gdix1001_upside_down_props,
 };
 
-static const struct ts_dmi_data gdix1002_00_upside_down_data = {
-       .acpi_name      = "GDIX1002:00",
+static const struct ts_dmi_data gdix1002_upside_down_data = {
+       .acpi_name      = "GDIX1002",
        .properties     = gdix1001_upside_down_props,
 };
 
@@ -1412,7 +1407,7 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
        },
        {
                /* Juno Tablet */
-               .driver_data = (void *)&gdix1002_00_upside_down_data,
+               .driver_data = (void *)&gdix1002_upside_down_data,
                .matches = {
                        DMI_MATCH(DMI_SYS_VENDOR, "Default string"),
                        /* Both product- and board-name being "Default string" is somewhat rare */
@@ -1658,7 +1653,7 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
        },
        {
                /* Teclast X89 (Android version / BIOS) */
-               .driver_data = (void *)&gdix1001_00_upside_down_data,
+               .driver_data = (void *)&gdix1001_upside_down_data,
                .matches = {
                        DMI_MATCH(DMI_BOARD_VENDOR, "WISKY"),
                        DMI_MATCH(DMI_BOARD_NAME, "3G062i"),
@@ -1666,7 +1661,7 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
        },
        {
                /* Teclast X89 (Windows version / BIOS) */
-               .driver_data = (void *)&gdix1001_01_upside_down_data,
+               .driver_data = (void *)&gdix1001_upside_down_data,
                .matches = {
                        /* tPAD is too generic, also match on bios date */
                        DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"),
@@ -1684,7 +1679,7 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
        },
        {
                /* Teclast X98 Pro */
-               .driver_data = (void *)&gdix1001_00_upside_down_data,
+               .driver_data = (void *)&gdix1001_upside_down_data,
                .matches = {
                        /*
                         * Only match BIOS date, because the manufacturers
@@ -1788,7 +1783,7 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
        },
        {
                /* "WinBook TW100" */
-               .driver_data = (void *)&gdix1001_00_upside_down_data,
+               .driver_data = (void *)&gdix1001_upside_down_data,
                .matches = {
                        DMI_MATCH(DMI_SYS_VENDOR, "WinBook"),
                        DMI_MATCH(DMI_PRODUCT_NAME, "TW100")
@@ -1796,7 +1791,7 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
        },
        {
                /* WinBook TW700 */
-               .driver_data = (void *)&gdix1001_00_upside_down_data,
+               .driver_data = (void *)&gdix1001_upside_down_data,
                .matches = {
                        DMI_MATCH(DMI_SYS_VENDOR, "WinBook"),
                        DMI_MATCH(DMI_PRODUCT_NAME, "TW700")