Commit f0ddb8a9 authored by Hans de Goede's avatar Hans de Goede

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: default avatarKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20240212120608.30469-2-hdegoede@redhat.com
parent dbcbfd66
...@@ -415,18 +415,13 @@ static const struct property_entry gdix1001_upside_down_props[] = { ...@@ -415,18 +415,13 @@ static const struct property_entry gdix1001_upside_down_props[] = {
{ } { }
}; };
static const struct ts_dmi_data gdix1001_00_upside_down_data = { static const struct ts_dmi_data gdix1001_upside_down_data = {
.acpi_name = "GDIX1001:00", .acpi_name = "GDIX1001",
.properties = gdix1001_upside_down_props,
};
static const struct ts_dmi_data gdix1001_01_upside_down_data = {
.acpi_name = "GDIX1001:01",
.properties = gdix1001_upside_down_props, .properties = gdix1001_upside_down_props,
}; };
static const struct ts_dmi_data gdix1002_00_upside_down_data = { static const struct ts_dmi_data gdix1002_upside_down_data = {
.acpi_name = "GDIX1002:00", .acpi_name = "GDIX1002",
.properties = gdix1001_upside_down_props, .properties = gdix1001_upside_down_props,
}; };
...@@ -1412,7 +1407,7 @@ const struct dmi_system_id touchscreen_dmi_table[] = { ...@@ -1412,7 +1407,7 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
}, },
{ {
/* Juno Tablet */ /* Juno Tablet */
.driver_data = (void *)&gdix1002_00_upside_down_data, .driver_data = (void *)&gdix1002_upside_down_data,
.matches = { .matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Default string"), DMI_MATCH(DMI_SYS_VENDOR, "Default string"),
/* Both product- and board-name being "Default string" is somewhat rare */ /* Both product- and board-name being "Default string" is somewhat rare */
...@@ -1658,7 +1653,7 @@ const struct dmi_system_id touchscreen_dmi_table[] = { ...@@ -1658,7 +1653,7 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
}, },
{ {
/* Teclast X89 (Android version / BIOS) */ /* Teclast X89 (Android version / BIOS) */
.driver_data = (void *)&gdix1001_00_upside_down_data, .driver_data = (void *)&gdix1001_upside_down_data,
.matches = { .matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "WISKY"), DMI_MATCH(DMI_BOARD_VENDOR, "WISKY"),
DMI_MATCH(DMI_BOARD_NAME, "3G062i"), DMI_MATCH(DMI_BOARD_NAME, "3G062i"),
...@@ -1666,7 +1661,7 @@ const struct dmi_system_id touchscreen_dmi_table[] = { ...@@ -1666,7 +1661,7 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
}, },
{ {
/* Teclast X89 (Windows version / BIOS) */ /* Teclast X89 (Windows version / BIOS) */
.driver_data = (void *)&gdix1001_01_upside_down_data, .driver_data = (void *)&gdix1001_upside_down_data,
.matches = { .matches = {
/* tPAD is too generic, also match on bios date */ /* tPAD is too generic, also match on bios date */
DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"), DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"),
...@@ -1684,7 +1679,7 @@ const struct dmi_system_id touchscreen_dmi_table[] = { ...@@ -1684,7 +1679,7 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
}, },
{ {
/* Teclast X98 Pro */ /* Teclast X98 Pro */
.driver_data = (void *)&gdix1001_00_upside_down_data, .driver_data = (void *)&gdix1001_upside_down_data,
.matches = { .matches = {
/* /*
* Only match BIOS date, because the manufacturers * Only match BIOS date, because the manufacturers
...@@ -1788,7 +1783,7 @@ const struct dmi_system_id touchscreen_dmi_table[] = { ...@@ -1788,7 +1783,7 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
}, },
{ {
/* "WinBook TW100" */ /* "WinBook TW100" */
.driver_data = (void *)&gdix1001_00_upside_down_data, .driver_data = (void *)&gdix1001_upside_down_data,
.matches = { .matches = {
DMI_MATCH(DMI_SYS_VENDOR, "WinBook"), DMI_MATCH(DMI_SYS_VENDOR, "WinBook"),
DMI_MATCH(DMI_PRODUCT_NAME, "TW100") DMI_MATCH(DMI_PRODUCT_NAME, "TW100")
...@@ -1796,7 +1791,7 @@ const struct dmi_system_id touchscreen_dmi_table[] = { ...@@ -1796,7 +1791,7 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
}, },
{ {
/* WinBook TW700 */ /* WinBook TW700 */
.driver_data = (void *)&gdix1001_00_upside_down_data, .driver_data = (void *)&gdix1001_upside_down_data,
.matches = { .matches = {
DMI_MATCH(DMI_SYS_VENDOR, "WinBook"), DMI_MATCH(DMI_SYS_VENDOR, "WinBook"),
DMI_MATCH(DMI_PRODUCT_NAME, "TW700") DMI_MATCH(DMI_PRODUCT_NAME, "TW700")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment