From patchwork Fri Jan 5 11:09:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 10146299 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 227B0601A1 for ; Fri, 5 Jan 2018 11:09:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15B1A201F5 for ; Fri, 5 Jan 2018 11:09:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0A452287D1; Fri, 5 Jan 2018 11:09:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FC58201F5 for ; Fri, 5 Jan 2018 11:09:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751243AbeAELJ0 (ORCPT ); Fri, 5 Jan 2018 06:09:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38048 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750992AbeAELJZ (ORCPT ); Fri, 5 Jan 2018 06:09:25 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6D53985545; Fri, 5 Jan 2018 11:09:25 +0000 (UTC) Received: from shalem.localdomain.com (ovpn-116-59.ams2.redhat.com [10.36.116.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id 790775DC19; Fri, 5 Jan 2018 11:09:24 +0000 (UTC) From: Hans de Goede To: Jiri Kosina , Benjamin Tissoires Cc: Hans de Goede , linux-input@vger.kernel.org Subject: [PATCH 2/2] HID: asus: Fix special function keys on T200TA Date: Fri, 5 Jan 2018 12:09:19 +0100 Message-Id: <20180105110919.30399-2-hdegoede@redhat.com> In-Reply-To: <20180105110919.30399-1-hdegoede@redhat.com> References: <20180105110919.30399-1-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 05 Jan 2018 11:09:25 +0000 (UTC) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Benjamin Tissoires --- 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; }