From: Aditya Garg <gargaditya08@live.com>
To: "tzimmermann@suse.de" <tzimmermann@suse.de>,
"maarten.lankhorst@linux.intel.com"
<maarten.lankhorst@linux.intel.com>,
"mripard@kernel.org" <mripard@kernel.org>,
"airlied@gmail.com" <airlied@gmail.com>,
"daniel@ffwll.ch" <daniel@ffwll.ch>,
Jiri Kosina <jikos@kernel.org>,
"bentiss@kernel.org" <bentiss@kernel.org>
Cc: Orlando Chamberlain <orlandoch.dev@gmail.com>,
Kerem Karabay <kekrby@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Subject: [PATCH v3 3/9] HID: multitouch: support getting the contact ID from HID_DG_TRANSDUCER_INDEX fields
Date: Thu, 8 Aug 2024 13:52:14 +0000 [thread overview]
Message-ID: <949B2D47-5E20-4B0B-9441-5B41610AAE64@live.com> (raw)
In-Reply-To: <1368FEE8-58BB-41C9-B9AD-7F2F68FF1D53@live.com>
From: Kerem Karabay <kekrby@gmail.com>
This is needed to support Apple Touch Bars, where the contact ID is
contained in fields with the HID_DG_TRANSDUCER_INDEX usage.
Signed-off-by: Kerem Karabay <kekrby@gmail.com>
Signed-off-by: Aditya Garg <gargaditya08@live.com>
---
drivers/hid/hid-multitouch.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 56fc78841..3e92789ed 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -635,7 +635,9 @@ static struct mt_report_data *mt_allocate_report_data(struct mt_device *td,
if (field->logical == HID_DG_FINGER || td->hdev->group != HID_GROUP_MULTITOUCH_WIN_8) {
for (n = 0; n < field->report_count; n++) {
- if (field->usage[n].hid == HID_DG_CONTACTID) {
+ unsigned int hid = field->usage[n].hid;
+
+ if (hid == HID_DG_CONTACTID || hid == HID_DG_TRANSDUCER_INDEX) {
rdata->is_mt_collection = true;
break;
}
@@ -814,6 +816,7 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
MT_STORE_FIELD(tip_state);
return 1;
case HID_DG_CONTACTID:
+ case HID_DG_TRANSDUCER_INDEX:
MT_STORE_FIELD(contactid);
app->touches_by_report++;
return 1;
--
2.43.0
next prev parent reply other threads:[~2024-08-08 13:52 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-08 13:49 [PATCH v3 0/9] Touch Bar support for T2 Macs Aditya Garg
2024-08-08 13:50 ` [PATCH v3 1/9] HID: hid-appletb-bl: add driver for the backlight of Apple Touch Bars Aditya Garg
2024-08-10 12:16 ` Thomas Weißschuh
2024-08-10 13:23 ` Aditya Garg
2024-08-10 14:33 ` Thomas Weißschuh
2024-08-10 15:30 ` Aditya Garg
2024-08-10 16:26 ` Thomas Weißschuh
2024-08-10 16:42 ` Aditya Garg
2024-08-08 13:51 ` [PATCH v3 2/9] HID: hid-appletb-kbd: add driver for the keyboard mode Aditya Garg
2024-08-08 13:52 ` Aditya Garg [this message]
2024-08-08 13:53 ` [PATCH v3 4/9] HID: multitouch: support getting the tip state from HID_DG_TOUCH fields Aditya Garg
2024-08-08 13:53 ` [PATCH v3 5/9] HID: multitouch: take cls->maxcontacts into account for devices without a HID_DG_CONTACTMAX field too Aditya Garg
2024-08-08 13:54 ` [PATCH v3 6/9] HID: multitouch: allow specifying if a device is direct in a class Aditya Garg
2024-08-08 13:55 ` [PATCH v3 7/9] HID: multitouch: add device ID for Apple Touch Bars Aditya Garg
2024-08-08 13:56 ` [PATCH v3 8/9] drm/format-helper: Add conversion from XRGB8888 to BGR888 Aditya Garg
2024-08-08 13:57 ` [PATCH v3 9/9] drm/tiny: add driver for Apple Touch Bars in x86 Macs Aditya Garg
2024-08-10 8:51 ` [PATCH v3 0/9] Touch Bar support for T2 Macs Aditya Garg
-- strict thread matches above, loose matches on Subject: below --
2024-08-08 11:53 [PATCH v2 " Aditya Garg
2024-08-08 11:56 ` [PATCH v3 3/9] HID: multitouch: support getting the contact ID from HID_DG_TRANSDUCER_INDEX fields Aditya Garg
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=949B2D47-5E20-4B0B-9441-5B41610AAE64@live.com \
--to=gargaditya08@live.com \
--cc=airlied@gmail.com \
--cc=bentiss@kernel.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jikos@kernel.org \
--cc=kekrby@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=orlandoch.dev@gmail.com \
--cc=tzimmermann@suse.de \
/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