Input: goodix - platform/x86: touchscreen_dmi - Move upside down quirks to touchscreen_dmi.c
Move the DMI quirks for upside-down mounted Goodix touchscreens from drivers/input/touchscreen/goodix.c to drivers/platform/x86/touchscreen_dmi.c, where all the other x86 touchscreen quirks live. Note the touchscreen_dmi.c code attaches standard touchscreen device-properties to an i2c-client device based on a combination of a DMI match + a device-name match. I've verified that the: Teclast X98 Pro, WinBook TW100 and WinBook TW700 uses an ACPI devicename of "GDIX1001:00" based on acpidumps and/or dmesg output available on the web. This patch was tested on a Teclast X89 tablet. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20210504185746.175461-2-hdegoede@redhat.com
This commit is contained in:
@@ -178,51 +178,6 @@ static const unsigned long goodix_irq_flags[] = {
|
||||
IRQ_TYPE_LEVEL_HIGH,
|
||||
};
|
||||
|
||||
/*
|
||||
* Those tablets have their coordinates origin at the bottom right
|
||||
* of the tablet, as if rotated 180 degrees
|
||||
*/
|
||||
static const struct dmi_system_id rotated_screen[] = {
|
||||
#if defined(CONFIG_DMI) && defined(CONFIG_X86)
|
||||
{
|
||||
.ident = "Teclast X89",
|
||||
.matches = {
|
||||
/* tPAD is too generic, also match on bios date */
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "tPAD"),
|
||||
DMI_MATCH(DMI_BIOS_DATE, "12/19/2014"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.ident = "Teclast X98 Pro",
|
||||
.matches = {
|
||||
/*
|
||||
* Only match BIOS date, because the manufacturers
|
||||
* BIOS does not report the board name at all
|
||||
* (sometimes)...
|
||||
*/
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"),
|
||||
DMI_MATCH(DMI_BIOS_DATE, "10/28/2015"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.ident = "WinBook TW100",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "WinBook"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "TW100")
|
||||
}
|
||||
},
|
||||
{
|
||||
.ident = "WinBook TW700",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "WinBook"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "TW700")
|
||||
},
|
||||
},
|
||||
#endif
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct dmi_system_id nine_bytes_report[] = {
|
||||
#if defined(CONFIG_DMI) && defined(CONFIG_X86)
|
||||
{
|
||||
@@ -1123,13 +1078,6 @@ static int goodix_configure_dev(struct goodix_ts_data *ts)
|
||||
ABS_MT_POSITION_Y, ts->prop.max_y);
|
||||
}
|
||||
|
||||
if (dmi_check_system(rotated_screen)) {
|
||||
ts->prop.invert_x = true;
|
||||
ts->prop.invert_y = true;
|
||||
dev_dbg(&ts->client->dev,
|
||||
"Applying '180 degrees rotated screen' quirk\n");
|
||||
}
|
||||
|
||||
if (dmi_check_system(nine_bytes_report)) {
|
||||
ts->contact_size = 9;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user