From patchwork Tue Sep 13 09:52:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Tissoires X-Patchwork-Id: 9328667 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 7A9C9607FD for ; Tue, 13 Sep 2016 09:52:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D44E28931 for ; Tue, 13 Sep 2016 09:52:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 61A1929286; Tue, 13 Sep 2016 09:52: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.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 0DA6829284 for ; Tue, 13 Sep 2016 09:52:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755607AbcIMJwt (ORCPT ); Tue, 13 Sep 2016 05:52:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46102 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757445AbcIMJwq (ORCPT ); Tue, 13 Sep 2016 05:52:46 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0600383F3C; Tue, 13 Sep 2016 09:52:46 +0000 (UTC) Received: from plouf.banquise.eu.com (ovpn-116-65.ams2.redhat.com [10.36.116.65]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8D9qefh017856; Tue, 13 Sep 2016 05:52:43 -0400 From: Benjamin Tissoires To: Jiri Kosina , Jason Gerecke Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] HID: wacom: do not detect Pad devices as joysticks Date: Tue, 13 Sep 2016 11:52:38 +0200 Message-Id: <1473760358-31999-3-git-send-email-benjamin.tissoires@redhat.com> In-Reply-To: <1473760358-31999-1-git-send-email-benjamin.tissoires@redhat.com> References: <1473760358-31999-1-git-send-email-benjamin.tissoires@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 13 Sep 2016 09:52:46 +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 Well, joydev consider our Pad devices as joysticks and associate a /dev/input/jsX node for them. The problem is that it consider the ABS_X value as 0, and sends some spurious joystick events saying the X axis is full left (Y too, but full up). Given that we are basically screwed, add one more BTN which tells joydev to ignore the Pad device and doesn't interfere with the rest of the udev rules and the processing. Signed-off-by: Benjamin Tissoires --- drivers/hid/wacom_wac.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index 8fd115f..498f4a8 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@ -2920,6 +2920,9 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev, /* kept for making udev and libwacom accepting the pad */ __set_bit(BTN_STYLUS, input_dev->keybit); + /* added to be ignored by joydev */ + __set_bit(BTN_TOOL_PEN, input_dev->keybit); + wacom_setup_numbered_buttons(input_dev, features->numbered_buttons); switch (features->type) {