linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Hans de Goede <hdegoede@redhat.com>, linux-input@vger.kernel.org
Subject: [PATCH 1/2] HID: asus: Add touchpad max x/y and resolution info for the T200TA
Date: Fri,  5 Jan 2018 12:09:18 +0100	[thread overview]
Message-ID: <20180105110919.30399-1-hdegoede@redhat.com> (raw)

The Asus T200TA uses the same USB device-id for its keyboard dock as the
T100TA, but the touchpad has a different size and corresponding different
max x/y values.

Add a separate asus_touchpad_info struct for the T200TA and select this
based on the DMI product-name (as we are already doing for the T100HA),
so that we report the correct info to userspace.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/hid/hid-asus.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index 6d2894b7d8e7..07525bc99b6a 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -129,6 +129,15 @@ static const struct asus_touchpad_info asus_t100ha_tp = {
 	.max_contacts = 5,
 };
 
+static const struct asus_touchpad_info asus_t200ta_tp = {
+	.max_x = 3120,
+	.max_y = 1716,
+	.res_x = 30, /* units/mm */
+	.res_y = 28, /* units/mm */
+	.contact_size = 5,
+	.max_contacts = 5,
+};
+
 static const struct asus_touchpad_info asus_t100chi_tp = {
 	.max_x = 2640,
 	.max_y = 1320,
@@ -617,11 +626,14 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
 		if (intf->altsetting->desc.bInterfaceNumber == T100_TPAD_INTF) {
 			drvdata->quirks = QUIRK_SKIP_INPUT_MAPPING;
 			/*
-			 * The T100HA uses the same USB-ids as the T100TAF,
-			 * but has different max_x / max_y values.
+			 * The T100HA uses the same USB-ids as the T100TAF and
+			 * the T200TA uses the same USB-ids as the T100TA, while
+			 * both have different max x/y values as the T100TA[F].
 			 */
 			if (dmi_match(DMI_PRODUCT_NAME, "T100HAN"))
 				drvdata->tp = &asus_t100ha_tp;
+			else if (dmi_match(DMI_PRODUCT_NAME, "T200TA"))
+				drvdata->tp = &asus_t200ta_tp;
 			else
 				drvdata->tp = &asus_t100ta_tp;
 		}
-- 
2.14.3


             reply	other threads:[~2018-01-05 11:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-05 11:09 Hans de Goede [this message]
2018-01-05 11:09 ` [PATCH 2/2] HID: asus: Fix special function keys on T200TA Hans de Goede
2018-01-05 17:00   ` Benjamin Tissoires
2018-01-11 14:10     ` Hans de Goede
2018-01-11 14:21       ` Jiri Kosina
2018-01-23 14:45 ` [PATCH 1/2] HID: asus: Add touchpad max x/y and resolution info for the T200TA Jiri Kosina

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=20180105110919.30399-1-hdegoede@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    /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).