From patchwork Thu Nov 12 16:25:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: simon@mungewell.org X-Patchwork-Id: 7603601 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 836EC9F1D3 for ; Thu, 12 Nov 2015 16:26:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 97AE720814 for ; Thu, 12 Nov 2015 16:26:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E51020810 for ; Thu, 12 Nov 2015 16:26:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753411AbbKLQ01 (ORCPT ); Thu, 12 Nov 2015 11:26:27 -0500 Received: from host18.canaca.com ([66.49.204.205]:38191 "EHLO host18.canaca.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932399AbbKLQZ7 (ORCPT ); Thu, 12 Nov 2015 11:25:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mungewell.org; s=default; h=References:In-Reply-To:Message-Id:Date:Subject: Cc:To:From; bh=LpOWWz4DPYsDFZ6rKZdNToRZrryfzWT/Ay43Xjrs+U0=; b=ZXK0AuLQqFAd+D fxorSTmGeCH8dFTakfTOe+hfzzvlyepUonzIGruf3wRTEifj7FRdq6+qeq8rZGqj4bsprEqRW3rl6 UxkPZEJ7jPl/Y7q5Ffwi/OW6wQEx6MRcZ45adBK0yl7N3VUrDEmuugi5n4CfGMGD3o7euPc9eivWD jYOvsx4DnjI6uBQd6SeGOxQc6W0eKQqB3xF/tOI6t/X2LoGK0zsNrcATDbw9qUMYPcQizvi9Ykp6w kJyU6N7BAt9+Sel50Zs552OR/ob2bxtgCwuJaWjiiKAqDqzFBWK1ztJk6OIvGhcM5phqDKiOPXrlq ic2Mv7cCMOD5b1RQ1G2A==; Received: from [208.75.119.66] (port=34612 helo=localhost.localdomain) by host18.canaca.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-SHA256:128) (Exim 4.86) (envelope-from ) id 1ZwuhD-0007P1-7B; Thu, 12 Nov 2015 11:25:59 -0500 From: Simon Wood To: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Jiri Kosina , Edwin , =?UTF-8?q?Michal=20Mal=C3=BD?= , elias vanderstuyft , Benjamin Tissoires , Simon Wood Subject: [Patch-V2 5/6] HID: Add vendor specific usage pages for Logitech G920 Date: Thu, 12 Nov 2015 09:25:34 -0700 Message-Id: <1447345535-2912-6-git-send-email-simon@mungewell.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1447345535-2912-1-git-send-email-simon@mungewell.org> References: <1447345535-2912-1-git-send-email-simon@mungewell.org> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host18.canaca.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - mungewell.org X-Get-Message-Sender-Via: host18.canaca.com: authenticated_id: gitsend@mungewell.org X-Authenticated-Sender: host18.canaca.com: gitsend@mungewell.org X-Source: X-Source-Args: X-Source-Dir: Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Logitech G920 uses a couple of vendor specific usage pages, which results in incorrect number of axis/buttons being detected. This patch adds these pages to the 'ignore' list. Reported-by: Elias Vanderstuyft Signed-off-by: Simon Wood --- drivers/hid/hid-input.c | 4 ++++ include/linux/hid.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 2ba6bf6..f4eeb6b 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -960,6 +960,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel goto ignore; case HID_UP_LOGIVENDOR: + /* intentional fallback */ + case HID_UP_LOGIVENDOR2: + /* intentional fallback */ + case HID_UP_LOGIVENDOR3: goto ignore; case HID_UP_PID: diff --git a/include/linux/hid.h b/include/linux/hid.h index 251a1d3..a6d7a3f 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -168,6 +168,8 @@ struct hid_item { #define HID_UP_MSVENDOR 0xff000000 #define HID_UP_CUSTOM 0x00ff0000 #define HID_UP_LOGIVENDOR 0xffbc0000 +#define HID_UP_LOGIVENDOR2 0xff090000 +#define HID_UP_LOGIVENDOR3 0xff430000 #define HID_UP_LNVENDOR 0xffa00000 #define HID_UP_SENSOR 0x00200000