Commit dbd3ef28 authored by Hans de Goede's avatar Hans de Goede Committed by Jiri Kosina

HID: asus: Add touchpad max x/y and resolution info for the T200TA

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: default avatarHans de Goede <hdegoede@redhat.com>
Acked-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 762f948c
...@@ -129,6 +129,15 @@ static const struct asus_touchpad_info asus_t100ha_tp = { ...@@ -129,6 +129,15 @@ static const struct asus_touchpad_info asus_t100ha_tp = {
.max_contacts = 5, .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 = { static const struct asus_touchpad_info asus_t100chi_tp = {
.max_x = 2640, .max_x = 2640,
.max_y = 1320, .max_y = 1320,
...@@ -617,11 +626,14 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id) ...@@ -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) { if (intf->altsetting->desc.bInterfaceNumber == T100_TPAD_INTF) {
drvdata->quirks = QUIRK_SKIP_INPUT_MAPPING; drvdata->quirks = QUIRK_SKIP_INPUT_MAPPING;
/* /*
* The T100HA uses the same USB-ids as the T100TAF, * The T100HA uses the same USB-ids as the T100TAF and
* but has different max_x / max_y values. * 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")) if (dmi_match(DMI_PRODUCT_NAME, "T100HAN"))
drvdata->tp = &asus_t100ha_tp; drvdata->tp = &asus_t100ha_tp;
else if (dmi_match(DMI_PRODUCT_NAME, "T200TA"))
drvdata->tp = &asus_t200ta_tp;
else else
drvdata->tp = &asus_t100ta_tp; drvdata->tp = &asus_t100ta_tp;
} }
......
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