linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Bastien Nocera <hadess@hadess.net>,
	Mark Gross <mgross@linux.intel.com>,
	Andy Shevchenko <andy@infradead.org>
Cc: Hans de Goede <hdegoede@redhat.com>, Arkadiy <arkan49@yandex.ru>,
	"Sergei A . Trusov" <sergei.a.trusov@ya.ru>,
	linux-input@vger.kernel.org, platform-driver-x86@vger.kernel.org
Subject: [RFC 3/4] Input: goodix - platform/x86: touchscreen_dmi - Move inverted-x quirk to touchscreen_dmi.c
Date: Sun,  2 May 2021 12:09:48 +0200	[thread overview]
Message-ID: <20210502100949.5371-4-hdegoede@redhat.com> (raw)
In-Reply-To: <20210502100949.5371-1-hdegoede@redhat.com>

Move the DMI quirk for the Goodix touchscreen with inverted X coordinates
found on the Cube I15-TC tablet from drivers/input/touchscreen/goodix.c to
drivers/platform/x86/touchscreen_dmi.c, where all the other x86
touchscreen quirks live.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/input/touchscreen/goodix.c     | 22 ----------------------
 drivers/platform/x86/touchscreen_dmi.c | 19 +++++++++++++++++++
 2 files changed, 19 insertions(+), 22 deletions(-)

diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c
index d92f6b2b6dcf..2203ad4d8e30 100644
--- a/drivers/input/touchscreen/goodix.c
+++ b/drivers/input/touchscreen/goodix.c
@@ -131,22 +131,6 @@ static const struct dmi_system_id nine_bytes_report[] = {
 	{}
 };
 
-/*
- * Those tablets have their x coordinate inverted
- */
-static const struct dmi_system_id inverted_x_screen[] = {
-#if defined(CONFIG_DMI) && defined(CONFIG_X86)
-	{
-		.ident = "Cube I15-TC",
-		.matches = {
-			DMI_MATCH(DMI_SYS_VENDOR, "Cube"),
-			DMI_MATCH(DMI_PRODUCT_NAME, "I15-TC")
-		},
-	},
-#endif
-	{}
-};
-
 /**
  * goodix_i2c_read - read data from a register of the i2c slave device.
  *
@@ -1048,12 +1032,6 @@ static int goodix_configure_dev(struct goodix_ts_data *ts)
 			"Non-standard 9-bytes report format quirk\n");
 	}
 
-	if (dmi_check_system(inverted_x_screen)) {
-		ts->prop.invert_x = true;
-		dev_dbg(&ts->client->dev,
-			"Applying 'inverted x screen' quirk\n");
-	}
-
 	error = input_mt_init_slots(ts->input_dev, ts->max_touch_num,
 				    INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED);
 	if (error) {
diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c
index bb47cea8d297..60876d8962b6 100644
--- a/drivers/platform/x86/touchscreen_dmi.c
+++ b/drivers/platform/x86/touchscreen_dmi.c
@@ -218,6 +218,17 @@ static const struct ts_dmi_data cube_iwork8_air_data = {
 	.properties	= cube_iwork8_air_props,
 };
 
+static const struct property_entry cube_iwork10_ultimate_i15_tc_props[] = {
+	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
+	{ }
+};
+
+static const struct ts_dmi_data cube_iwork10_ultimate_i15_tc_data = {
+	.acpi_hid	= "GDIX1001",
+	.properties	= cube_iwork10_ultimate_i15_tc_props,
+};
+
+
 static const struct property_entry cube_knote_i1101_props[] = {
 	PROPERTY_ENTRY_U32("touchscreen-min-x", 20),
 	PROPERTY_ENTRY_U32("touchscreen-min-y",  22),
@@ -992,6 +1003,14 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
 			DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
 		},
 	},
+	{
+		/* CUBE iWork10 Ultimate (I15-TC) */
+		.driver_data = (void *)&cube_iwork10_ultimate_i15_tc_data,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Cube"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "I15-TC")
+		},
+	},
 	{
 		/* Cube KNote i1101 */
 		.driver_data = (void *)&cube_knote_i1101_data,
-- 
2.31.1


  parent reply	other threads:[~2021-05-02 10:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-02 10:09 [RFC 0/4] Input: goodix - platform/x86: touchscreen_dmi - Move quirks to touchscreen_dmi.c Hans de Goede
2021-05-02 10:09 ` [RFC 1/4] platform/x86: touchscreen_dmi: Match on ACPI HID instead of ACPI companion-dev-name Hans de Goede
2021-05-04  7:30   ` Hans de Goede
2021-05-02 10:09 ` [RFC 2/4] Input: goodix - platform/x86: touchscreen_dmi - Move upside down quirks to touchscreen_dmi.c Hans de Goede
2021-05-02 10:09 ` Hans de Goede [this message]
2021-05-02 10:09 ` [RFC 4/4] platform/x86: touchscreen_dmi: Add an extra entry for the upside down Goodix touchscreen on Teclast X89 tablets Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210502100949.5371-4-hdegoede@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=andy@infradead.org \
    --cc=arkan49@yandex.ru \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hadess@hadess.net \
    --cc=linux-input@vger.kernel.org \
    --cc=mgross@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=sergei.a.trusov@ya.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).