From: Jason Gerecke <killertofu@gmail.com>
To: jkosina@suse.cz
Cc: linux-input@vger.kernel.org, benjamin.tissoires@gmail.com,
pinglinux@gmail.com, Jason Gerecke <killertofu@gmail.com>
Subject: [PATCH 2/3] HID: wacom: Manually declare ABS_{X,Y} for pointer emulation
Date: Mon, 24 Nov 2014 15:32:13 -0800 [thread overview]
Message-ID: <1416871934-14133-3-git-send-email-killertofu@gmail.com> (raw)
In-Reply-To: <1416871934-14133-1-git-send-email-killertofu@gmail.com>
If a HID descriptor places HID_DG_CONTACTID before HID_DG_X and HID_DG_Y then
the ABS_X and ABS_Y will not be automatically initialized by the call to
input_mt_init_slots. Here we move the setup of those axes outside of the
'if' statement so that they're always present if the associated HID field
is.
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
---
drivers/hid/wacom_wac.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index 1468f00..a55e0ed 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -1382,16 +1382,14 @@ static void wacom_wac_finger_usage_mapping(struct hid_device *hdev,
switch (usage->hid) {
case HID_GD_X:
- if (touch_max == 1)
- wacom_map_usage(wacom, usage, field, EV_ABS, ABS_X, 4);
- else
+ wacom_map_usage(wacom, usage, field, EV_ABS, ABS_X, 4);
+ if (touch_max > 1)
wacom_map_usage(wacom, usage, field, EV_ABS,
ABS_MT_POSITION_X, 4);
break;
case HID_GD_Y:
- if (touch_max == 1)
- wacom_map_usage(wacom, usage, field, EV_ABS, ABS_Y, 4);
- else
+ wacom_map_usage(wacom, usage, field, EV_ABS, ABS_Y, 4);
+ if (touch_max > 1)
wacom_map_usage(wacom, usage, field, EV_ABS,
ABS_MT_POSITION_Y, 4);
break;
--
2.1.3
next prev parent reply other threads:[~2014-11-24 23:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-24 23:32 [PATCH 0/3] HID: wacom: Fix generic multitouch device handling Jason Gerecke
2014-11-24 23:32 ` [PATCH 1/3] HID: wacom: Consult the application usage when determining field type Jason Gerecke
2014-11-25 15:29 ` Benjamin Tissoires
2014-11-27 13:45 ` Jiri Kosina
2014-11-24 23:32 ` Jason Gerecke [this message]
2014-11-25 15:34 ` [PATCH 2/3] HID: wacom: Manually declare ABS_{X,Y} for pointer emulation Benjamin Tissoires
2014-11-24 23:32 ` [PATCH 3/3] HID: wacom: Report input events immediately upon receipt Jason Gerecke
2014-11-25 15:52 ` 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=1416871934-14133-3-git-send-email-killertofu@gmail.com \
--to=killertofu@gmail.com \
--cc=benjamin.tissoires@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).