From: Jason Gerecke <killertofu@gmail.com>
To: linux-input@vger.kernel.org
Cc: Ping Cheng <pinglinux@gmail.com>,
Benjamin Tissoires <benjamin.tissoires@gmail.com>,
Jiri Kosina <jkosina@suse.cz>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Jason Gerecke <killertofu@gmail.com>
Subject: [PATCH] HID: wacom: Report ABS_MISC event for Cintiq Companion Hybrid
Date: Thu, 22 Jan 2015 15:53:28 -0800 [thread overview]
Message-ID: <1421970808-4098-1-git-send-email-killertofu@gmail.com> (raw)
It appears that the Cintiq Companion Hybrid does not send an ABS_MISC
event to userspace when any of its ExpressKeys are pressed. This is not
strictly necessary now that the pad exists on its own device, but
should be fixed for consistency's sake.
Traditionally both the stylus and pad shared the same device node, and
xf86-input-wacom would use ABS_MISC for disambiguation. Not sending this
causes the Hybrid to behave incorrectly with xf86-input-wacom beginning with
its 8f44f3 commit.
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
---
Question: I'd like to write a version of this patch which targets stable
releases where the stylus and pad share the device node. How would I go
about submitting one, since CCing this patch to stable won't quite do the
trick (the patches would have to be against our old home under
drivers/input/tablet...)
drivers/hid/wacom_wac.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index a4ba8ca..f886149 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -783,6 +783,12 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
input_report_key(input, BTN_7, (data[4] & 0x40)); /* Left */
input_report_key(input, BTN_8, (data[4] & 0x80)); /* Down */
input_report_key(input, BTN_0, (data[3] & 0x01)); /* Center */
+
+ if (data[4] | (data[3] & 0x01)) {
+ input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
+ } else {
+ input_report_abs(input, ABS_MISC, 0);
+ }
} else if (features->type >= INTUOS5S && features->type <= INTUOSPL) {
int i;
--
2.2.1
next reply other threads:[~2015-01-22 23:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-22 23:53 Jason Gerecke [this message]
2015-01-23 0:56 ` [PATCH] HID: wacom: Report ABS_MISC event for Cintiq Companion Hybrid Benjamin Tissoires
2015-01-23 14:07 ` Jiri Kosina
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=1421970808-4098-1-git-send-email-killertofu@gmail.com \
--to=killertofu@gmail.com \
--cc=benjamin.tissoires@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=pinglinux@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).