From patchwork Tue Sep 27 18:41:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adi Ratiu X-Patchwork-Id: 9352633 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 5AA0A6077B for ; Tue, 27 Sep 2016 18:41:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F7B228682 for ; Tue, 27 Sep 2016 18:41:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 43F42289EE; Tue, 27 Sep 2016 18:41:51 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 85BF728682 for ; Tue, 27 Sep 2016 18:41:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755454AbcI0Slr (ORCPT ); Tue, 27 Sep 2016 14:41:47 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36804 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754162AbcI0Slq (ORCPT ); Tue, 27 Sep 2016 14:41:46 -0400 Received: by mail-wm0-f66.google.com with SMTP id b184so2467295wma.3 for ; Tue, 27 Sep 2016 11:41:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adirat-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=alNykINdHMkHjMqKFz5YeZKAnkGkooaMbP9uJOznMjs=; b=X6UAD3BCrLv9CyfOu+x7PEu3cCmsDEHJ3QYK5Oc84A9lIw8LYHFeD7cUr7sTiI0Zli MHtWp5RTFjsDxmepGvvxLQ9gw/Kk5/V0GHkPMNnnEq7TnVPEQv1FLJn92AkBi6cVxCvI TaDAMIf0ot2vqdbptQ7RLL1PvSIdDT7FuZzuednndSq1nzFby7vmeHdz2/x1D29/E0Ba +Qk8bkIxMoTsYn2TYnrM1WifGrlyqQ8M9AOvAB25M2u5ySAYuvwBG8ERlR8ITVkwPe9Y Jp28gTDpd02ui2bsd+4BKy7/4SC7Qnes0h2hu0+9LVuQ6GQweMfJJ7xEL1K/z8K4ZTlB Ya3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=alNykINdHMkHjMqKFz5YeZKAnkGkooaMbP9uJOznMjs=; b=lBAlfufa+o+i3H3CO1qWaPY5/Fg0oq/8uxWYI3grN/a5xZRbTUQga4uKeo96EpP39h aJ8ZdVeo260k2IqWv+oyhudTJZZ71skcupWGhAb/O33o1Q+8GrujkJBIKgehGEClPEKA dVPb7daMQqY2Wkq6i1aubFFlIYMGmMcWNSqkFZNvOZcJ+f6fWlRyfRKuIk4QiTdoV7e3 HT+3EZGrBnhtLBZIcvBu34qKGark+Ef6+9b2LOFSifND6Kb6q1Rn0oduX4Ds0dxz4kX+ vK4vmPiFOKMCUqizugUXfjg9YJ/0li2HomFGwwajechnLMmlr9vb+eTsjc3miF8Hv75r Qm4w== X-Gm-Message-State: AA6/9RmxMOUmqAnWF2nzk0lvxOGQ3FOR0uSp1R1Z9NBcUaGD6qYd0Zs4pvTj4w8AZb18Ig== X-Received: by 10.28.95.134 with SMTP id t128mr4122325wmb.99.1475001704933; Tue, 27 Sep 2016 11:41:44 -0700 (PDT) Received: from adiPC.lan ([188.24.78.211]) by smtp.gmail.com with ESMTPSA id 74sm4488410wmi.7.2016.09.27.11.41.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Sep 2016 11:41:43 -0700 (PDT) From: Ioan-Adrian Ratiu To: benjamin.tissoires@redhat.com, jikos@kernel.org Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, spbnick@gmail.com Subject: [PATCH v2 1/2] Revert "HID: dragonrise: fix HID Descriptor for 0x0006 PID" Date: Tue, 27 Sep 2016 21:41:37 +0300 Message-Id: <20160927184138.3009-1-adi@adirat.com> X-Mailer: git-send-email 2.10.0 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 This reverts commit 18339f59c3a6 ("HID: dragonrise: fix HID...") because it breaks certain dragonrise 0079:0006 gamepads. While it may fix a breakage caused by commit 79346d620e9d ("HID: input: force generic axis to be mapped to their user space axis"), it is probable that the manufacturer released different hardware with the same PID so this fix works for only a subset and breaks the other gamepads sharing the PID. What is needed is another more generic solution which fixes 79346d620e9d ("HID: input: force generic axis ...") breakage for this controller: we need to add an exception for this driver to make it keep the old behaviour previous to the initial breakage (this is done in patch 2 of this series). Signed-off-by: Ioan-Adrian Ratiu Reviewed-by: Benjamin Tissoires --- drivers/hid/hid-dr.c | 58 ---------------------------------------------------- 1 file changed, 58 deletions(-) diff --git a/drivers/hid/hid-dr.c b/drivers/hid/hid-dr.c index 8fd4bf7..2523f8a 100644 --- a/drivers/hid/hid-dr.c +++ b/drivers/hid/hid-dr.c @@ -234,58 +234,6 @@ static __u8 pid0011_rdesc_fixed[] = { 0xC0 /* End Collection */ }; -static __u8 pid0006_rdesc_fixed[] = { - 0x05, 0x01, /* Usage Page (Generic Desktop) */ - 0x09, 0x04, /* Usage (Joystick) */ - 0xA1, 0x01, /* Collection (Application) */ - 0xA1, 0x02, /* Collection (Logical) */ - 0x75, 0x08, /* Report Size (8) */ - 0x95, 0x05, /* Report Count (5) */ - 0x15, 0x00, /* Logical Minimum (0) */ - 0x26, 0xFF, 0x00, /* Logical Maximum (255) */ - 0x35, 0x00, /* Physical Minimum (0) */ - 0x46, 0xFF, 0x00, /* Physical Maximum (255) */ - 0x09, 0x30, /* Usage (X) */ - 0x09, 0x33, /* Usage (Ry) */ - 0x09, 0x32, /* Usage (Z) */ - 0x09, 0x31, /* Usage (Y) */ - 0x09, 0x34, /* Usage (Ry) */ - 0x81, 0x02, /* Input (Variable) */ - 0x75, 0x04, /* Report Size (4) */ - 0x95, 0x01, /* Report Count (1) */ - 0x25, 0x07, /* Logical Maximum (7) */ - 0x46, 0x3B, 0x01, /* Physical Maximum (315) */ - 0x65, 0x14, /* Unit (Centimeter) */ - 0x09, 0x39, /* Usage (Hat switch) */ - 0x81, 0x42, /* Input (Variable) */ - 0x65, 0x00, /* Unit (None) */ - 0x75, 0x01, /* Report Size (1) */ - 0x95, 0x0C, /* Report Count (12) */ - 0x25, 0x01, /* Logical Maximum (1) */ - 0x45, 0x01, /* Physical Maximum (1) */ - 0x05, 0x09, /* Usage Page (Button) */ - 0x19, 0x01, /* Usage Minimum (0x01) */ - 0x29, 0x0C, /* Usage Maximum (0x0C) */ - 0x81, 0x02, /* Input (Variable) */ - 0x06, 0x00, 0xFF, /* Usage Page (Vendor Defined) */ - 0x75, 0x01, /* Report Size (1) */ - 0x95, 0x08, /* Report Count (8) */ - 0x25, 0x01, /* Logical Maximum (1) */ - 0x45, 0x01, /* Physical Maximum (1) */ - 0x09, 0x01, /* Usage (0x01) */ - 0x81, 0x02, /* Input (Variable) */ - 0xC0, /* End Collection */ - 0xA1, 0x02, /* Collection (Logical) */ - 0x75, 0x08, /* Report Size (8) */ - 0x95, 0x07, /* Report Count (7) */ - 0x46, 0xFF, 0x00, /* Physical Maximum (255) */ - 0x26, 0xFF, 0x00, /* Logical Maximum (255) */ - 0x09, 0x02, /* Usage (0x02) */ - 0x91, 0x02, /* Output (Variable) */ - 0xC0, /* End Collection */ - 0xC0 /* End Collection */ -}; - static __u8 *dr_report_fixup(struct hid_device *hdev, __u8 *rdesc, unsigned int *rsize) { @@ -296,12 +244,6 @@ static __u8 *dr_report_fixup(struct hid_device *hdev, __u8 *rdesc, *rsize = sizeof(pid0011_rdesc_fixed); } break; - case 0x0006: - if (*rsize == sizeof(pid0006_rdesc_fixed)) { - rdesc = pid0006_rdesc_fixed; - *rsize = sizeof(pid0006_rdesc_fixed); - } - break; } return rdesc; }