* [PATCH 1/2] HID: asus: Add touchpad max x/y and resolution info for the T200TA
@ 2018-01-05 11:09 Hans de Goede
2018-01-05 11:09 ` [PATCH 2/2] HID: asus: Fix special function keys on T200TA Hans de Goede
2018-01-23 14:45 ` [PATCH 1/2] HID: asus: Add touchpad max x/y and resolution info for the T200TA Jiri Kosina
0 siblings, 2 replies; 6+ messages in thread
From: Hans de Goede @ 2018-01-05 11:09 UTC (permalink / raw)
To: Jiri Kosina, Benjamin Tissoires; +Cc: Hans de Goede, linux-input
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] HID: asus: Fix special function keys on T200TA
2018-01-05 11:09 [PATCH 1/2] HID: asus: Add touchpad max x/y and resolution info for the T200TA Hans de Goede
@ 2018-01-05 11:09 ` Hans de Goede
2018-01-05 17:00 ` Benjamin Tissoires
2018-01-23 14:45 ` [PATCH 1/2] HID: asus: Add touchpad max x/y and resolution info for the T200TA Jiri Kosina
1 sibling, 1 reply; 6+ messages in thread
From: Hans de Goede @ 2018-01-05 11:09 UTC (permalink / raw)
To: Jiri Kosina, Benjamin Tissoires; +Cc: Hans de Goede, linux-input
Just like on the T100TA the T200TA HID descriptors for the 0xff32
Asus vendor usage page need a small fixup. But on the T200TA the HID
descriptors are larger because they have descrriptors for one more
(unused) HID report appended.
Extend the T100TA descriptor fixup to also check for the T200TA's
descriptors size.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/hid/hid-asus.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index 07525bc99b6a..88b9703318e4 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -715,9 +715,10 @@ static __u8 *asus_report_fixup(struct hid_device *hdev, __u8 *rdesc,
hid_info(hdev, "Fixing up Asus notebook report descriptor\n");
rdesc[55] = 0xdd;
}
- /* For the T100TA keyboard dock */
+ /* For the T100TA/T200TA keyboard dock */
if (drvdata->quirks & QUIRK_T100_KEYBOARD &&
- *rsize == 76 && rdesc[73] == 0x81 && rdesc[74] == 0x01) {
+ (*rsize == 76 || *rsize == 101) &&
+ rdesc[73] == 0x81 && rdesc[74] == 0x01) {
hid_info(hdev, "Fixing up Asus T100 keyb report descriptor\n");
rdesc[74] &= ~HID_MAIN_ITEM_CONSTANT;
}
--
2.14.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] HID: asus: Fix special function keys on T200TA
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
0 siblings, 1 reply; 6+ messages in thread
From: Benjamin Tissoires @ 2018-01-05 17:00 UTC (permalink / raw)
To: Hans de Goede; +Cc: Jiri Kosina, linux-input
On Fri, Jan 5, 2018 at 12:09 PM, Hans de Goede <hdegoede@redhat.com> wrote:
> Just like on the T100TA the T200TA HID descriptors for the 0xff32
> Asus vendor usage page need a small fixup. But on the T200TA the HID
> descriptors are larger because they have descrriptors for one more
> (unused) HID report appended.
>
> Extend the T100TA descriptor fixup to also check for the T200TA's
> descriptors size.
Sigh, both are:
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cheers,
Benjamin
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> drivers/hid/hid-asus.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
> index 07525bc99b6a..88b9703318e4 100644
> --- a/drivers/hid/hid-asus.c
> +++ b/drivers/hid/hid-asus.c
> @@ -715,9 +715,10 @@ static __u8 *asus_report_fixup(struct hid_device *hdev, __u8 *rdesc,
> hid_info(hdev, "Fixing up Asus notebook report descriptor\n");
> rdesc[55] = 0xdd;
> }
> - /* For the T100TA keyboard dock */
> + /* For the T100TA/T200TA keyboard dock */
> if (drvdata->quirks & QUIRK_T100_KEYBOARD &&
> - *rsize == 76 && rdesc[73] == 0x81 && rdesc[74] == 0x01) {
> + (*rsize == 76 || *rsize == 101) &&
> + rdesc[73] == 0x81 && rdesc[74] == 0x01) {
> hid_info(hdev, "Fixing up Asus T100 keyb report descriptor\n");
> rdesc[74] &= ~HID_MAIN_ITEM_CONSTANT;
> }
> --
> 2.14.3
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] HID: asus: Fix special function keys on T200TA
2018-01-05 17:00 ` Benjamin Tissoires
@ 2018-01-11 14:10 ` Hans de Goede
2018-01-11 14:21 ` Jiri Kosina
0 siblings, 1 reply; 6+ messages in thread
From: Hans de Goede @ 2018-01-11 14:10 UTC (permalink / raw)
To: Benjamin Tissoires; +Cc: Jiri Kosina, linux-input
Hi,
On 05-01-18 18:00, Benjamin Tissoires wrote:
> On Fri, Jan 5, 2018 at 12:09 PM, Hans de Goede <hdegoede@redhat.com> wrote:
>> Just like on the T100TA the T200TA HID descriptors for the 0xff32
>> Asus vendor usage page need a small fixup. But on the T200TA the HID
>> descriptors are larger because they have descrriptors for one more
>> (unused) HID report appended.
>>
>> Extend the T100TA descriptor fixup to also check for the T200TA's
>> descriptors size.
>
> Sigh, both are:
> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Thanks. Jiri, what is the status of these ?
Regards,
Hans
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>> drivers/hid/hid-asus.c | 5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
>> index 07525bc99b6a..88b9703318e4 100644
>> --- a/drivers/hid/hid-asus.c
>> +++ b/drivers/hid/hid-asus.c
>> @@ -715,9 +715,10 @@ static __u8 *asus_report_fixup(struct hid_device *hdev, __u8 *rdesc,
>> hid_info(hdev, "Fixing up Asus notebook report descriptor\n");
>> rdesc[55] = 0xdd;
>> }
>> - /* For the T100TA keyboard dock */
>> + /* For the T100TA/T200TA keyboard dock */
>> if (drvdata->quirks & QUIRK_T100_KEYBOARD &&
>> - *rsize == 76 && rdesc[73] == 0x81 && rdesc[74] == 0x01) {
>> + (*rsize == 76 || *rsize == 101) &&
>> + rdesc[73] == 0x81 && rdesc[74] == 0x01) {
>> hid_info(hdev, "Fixing up Asus T100 keyb report descriptor\n");
>> rdesc[74] &= ~HID_MAIN_ITEM_CONSTANT;
>> }
>> --
>> 2.14.3
>>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] HID: asus: Fix special function keys on T200TA
2018-01-11 14:10 ` Hans de Goede
@ 2018-01-11 14:21 ` Jiri Kosina
0 siblings, 0 replies; 6+ messages in thread
From: Jiri Kosina @ 2018-01-11 14:21 UTC (permalink / raw)
To: Hans de Goede; +Cc: Benjamin Tissoires, linux-input
On Thu, 11 Jan 2018, Hans de Goede wrote:
> >> Just like on the T100TA the T200TA HID descriptors for the 0xff32
> >> Asus vendor usage page need a small fixup. But on the T200TA the HID
> >> descriptors are larger because they have descrriptors for one more
> >> (unused) HID report appended.
> >>
> >> Extend the T100TA descriptor fixup to also check for the T200TA's
> >> descriptors size.
> >
> > Sigh, both are:
> > Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
>
> Thanks. Jiri, what is the status of these ?
Over past weeks I have been completely swamped in the Meltdown/Spectre
happines.
I hope to resume merging HID patches any time soon.
Sorry for the delays,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] HID: asus: Add touchpad max x/y and resolution info for the T200TA
2018-01-05 11:09 [PATCH 1/2] HID: asus: Add touchpad max x/y and resolution info for the T200TA Hans de Goede
2018-01-05 11:09 ` [PATCH 2/2] HID: asus: Fix special function keys on T200TA Hans de Goede
@ 2018-01-23 14:45 ` Jiri Kosina
1 sibling, 0 replies; 6+ messages in thread
From: Jiri Kosina @ 2018-01-23 14:45 UTC (permalink / raw)
To: Hans de Goede; +Cc: Benjamin Tissoires, linux-input
On Fri, 5 Jan 2018, Hans de Goede wrote:
> 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>
Unhappily applied both to for-4.16/hid-quirks-cleanup/asus. Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-01-23 14:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-05 11:09 [PATCH 1/2] HID: asus: Add touchpad max x/y and resolution info for the T200TA Hans de Goede
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
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).