From: Jason Gerecke <killertofu@gmail.com>
To: linux-input@vger.kernel.org
Cc: Jiri Kosina <jkosina@suse.cz>, Ping Cheng <pinglinux@gmail.com>,
Aaron Skomra <skomra@gmail.com>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Jason Gerecke <killertofu@gmail.com>,
Jason Gerecke <jason.gerecke@wacom.com>
Subject: [PATCH 3/3] HID: wacom: Fix ABS_MISC reporting for Cintiq Companion 2
Date: Mon, 2 Nov 2015 15:41:13 -0800 [thread overview]
Message-ID: <1446507673-4458-3-git-send-email-killertofu@gmail.com> (raw)
In-Reply-To: <1446507673-4458-1-git-send-email-killertofu@gmail.com>
The pad handling code introduced for the Cintiq Companion 2 (f7acb55)
looks at the wrong bytes in the report when deciding whether ABS_MISC
should be sent. This does not cause any issues with the X driver now
that the pen and pad have been split to separate devices, but is
incorrect and has caused issues when backporting to distros with pre-
3.17 kernels.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
---
drivers/hid/wacom_wac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index 453da6d..9db6a8b 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -966,7 +966,7 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
input_report_key(input, BTN_A, (data[2] & 0x80)); /* Down */
input_report_key(input, BTN_0, (data[1] & 0x01)); /* Center */
- if (data[4] | (data[3] & 0x01)) {
+ if (data[2] | (data[1] & 0x07)) {
input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
} else {
input_report_abs(input, ABS_MISC, 0);
--
2.6.2
prev parent reply other threads:[~2015-11-02 23:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-02 23:41 [PATCH 1/3] HID: wacom: Call 'wacom_query_tablet_data' only after 'hid_hw_start' Jason Gerecke
2015-11-02 23:41 ` [PATCH 2/3] HID: wacom: Remove useless conditions from 'wacom_query_tablet_data' Jason Gerecke
2015-11-03 1:40 ` Ping Cheng
2015-11-03 13:39 ` Jiri Kosina
2015-11-02 23:41 ` Jason Gerecke [this message]
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=1446507673-4458-3-git-send-email-killertofu@gmail.com \
--to=killertofu@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=jason.gerecke@wacom.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=pinglinux@gmail.com \
--cc=skomra@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).