All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Jiri Kosina <jikos@kernel.org>, Jason Gerecke <killertofu@gmail.com>
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	[thread overview]
Message-ID: <1473760358-31999-3-git-send-email-benjamin.tissoires@redhat.com> (raw)
In-Reply-To: <1473760358-31999-1-git-send-email-benjamin.tissoires@redhat.com>

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 <benjamin.tissoires@redhat.com>
---
 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) {
-- 
2.7.4

  parent reply	other threads:[~2016-09-13  9:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-13  9:52 [PATCH 0/2] Fix spurious joydev node on some unrelated devices Benjamin Tissoires
2016-09-13  9:52 ` [PATCH 1/2] HID: input: ignore System Control application usages if not System Controls Benjamin Tissoires
     [not found]   ` <CAAZ5spCtj6O+d6t7G2x7-m6rj4fSNQsak_QGeuqf4Bf2bqW7Cg@mail.gmail.com>
2016-09-13 13:58     ` Benjamin Tissoires
     [not found]       ` <CAAZ5spC9VX7QuMjfZUb-F_-i+ktz3HUpyP-3Ess2APTmyNQ5Dw@mail.gmail.com>
     [not found]         ` <CAAZ5spBHTytyXg6cGhHEBsZM=FWuL_v-BzUQ+J4pHp=OYtdcAg@mail.gmail.com>
2016-09-14 15:44           ` Benjamin Tissoires
2016-09-19 12:26           ` Jiri Kosina
2016-09-13  9:52 ` Benjamin Tissoires [this message]
     [not found]   ` <CAF8JNh+QHJNz_bNk930YZpV9UKbhSc7T13X--hAzVC7fQr-VWg@mail.gmail.com>
2016-09-14 15:58     ` [PATCH 2/2] HID: wacom: do not detect Pad devices as joysticks Benjamin Tissoires

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1473760358-31999-3-git-send-email-benjamin.tissoires@redhat.com \
    --to=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=killertofu@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.