Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1482324

[PATCH 2/2] HID: wacom: do not detect Pad devices as joysticks

From Benjamin Tissoires <benjamin.tissoires@redhat.com>
Newsgroups linux.kernel
Subject [PATCH 2/2] HID: wacom: do not detect Pad devices as joysticks
Date 2016-09-13 12:00 +0200
Message-ID <sgSFs-6J-23@gated-at.bofh.it> (permalink)
References <sgSFs-6J-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] Fix spurious joydev node on some unrelated devices Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2016-09-13 12:00 +0200
  [PATCH 2/2] HID: wacom: do not detect Pad devices as joysticks Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2016-09-13 12:00 +0200
    Re: [PATCH 2/2] HID: wacom: do not detect Pad devices as joysticks Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2016-09-14 18:00 +0200
  [PATCH 1/2] HID: input: ignore System Control application usages if not System Controls Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2016-09-13 12:00 +0200
    Re: [PATCH 1/2] HID: input: ignore System Control application usages  if not System Controls Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2016-09-13 16:00 +0200
      Re: [PATCH 1/2] HID: input: ignore System Control application usages  if not System Controls Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2016-09-14 17:50 +0200
      Re: [PATCH 1/2] HID: input: ignore System Control application usages  if not System Controls Jiri Kosina <jikos@kernel.org> - 2016-09-19 14:30 +0200

csiph-web