From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
patches@lists.linux.dev, Benjamin Tissoires <bentiss@kernel.org>,
Kerem Karabay <kekrby@gmail.com>,
Aditya Garg <gargaditya08@live.com>,
Jiri Kosina <jkosina@suse.com>, Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.6 09/91] HID: multitouch: Get the contact ID from HID_DG_TRANSDUCER_INDEX fields in case of Apple Touch Bar
Date: Tue, 30 Sep 2025 16:47:08 +0200 [thread overview]
Message-ID: <20250930143821.504615260@linuxfoundation.org> (raw)
In-Reply-To: <20250930143821.118938523@linuxfoundation.org>
6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kerem Karabay <kekrby@gmail.com>
[ Upstream commit f41d736acc039d86512951f4e874b0f5e666babf ]
In Apple Touch Bar, the contact ID is contained in fields with the
HID_DG_TRANSDUCER_INDEX usage rather than HID_DG_CONTACTID, thus differing
from the HID spec. Add a quirk for the same.
Acked-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Kerem Karabay <kekrby@gmail.com>
Co-developed-by: Aditya Garg <gargaditya08@live.com>
Signed-off-by: Aditya Garg <gargaditya08@live.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hid/hid-multitouch.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index a85581cd511fd..35426e702b301 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -72,6 +72,7 @@ MODULE_LICENSE("GPL");
#define MT_QUIRK_FORCE_MULTI_INPUT BIT(20)
#define MT_QUIRK_DISABLE_WAKEUP BIT(21)
#define MT_QUIRK_ORIENTATION_INVERT BIT(22)
+#define MT_QUIRK_APPLE_TOUCHBAR BIT(23)
#define MT_INPUTMODE_TOUCHSCREEN 0x02
#define MT_INPUTMODE_TOUCHPAD 0x03
@@ -612,6 +613,7 @@ static struct mt_application *mt_find_application(struct mt_device *td,
static struct mt_report_data *mt_allocate_report_data(struct mt_device *td,
struct hid_report *report)
{
+ struct mt_class *cls = &td->mtclass;
struct mt_report_data *rdata;
struct hid_field *field;
int r, n;
@@ -636,7 +638,11 @@ 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 ||
+ (cls->quirks & MT_QUIRK_APPLE_TOUCHBAR &&
+ hid == HID_DG_TRANSDUCER_INDEX)) {
rdata->is_mt_collection = true;
break;
}
@@ -814,6 +820,14 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
EV_KEY, BTN_TOUCH);
MT_STORE_FIELD(tip_state);
return 1;
+ case HID_DG_TRANSDUCER_INDEX:
+ /*
+ * Contact ID in case of Apple Touch Bars is contained
+ * in fields with HID_DG_TRANSDUCER_INDEX usage.
+ */
+ if (!(cls->quirks & MT_QUIRK_APPLE_TOUCHBAR))
+ return 0;
+ fallthrough;
case HID_DG_CONTACTID:
MT_STORE_FIELD(contactid);
app->touches_by_report++;
--
2.51.0
next prev parent reply other threads:[~2025-09-30 15:21 UTC|newest]
Thread overview: 103+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-30 14:46 [PATCH 6.6 00/91] 6.6.109-rc1 review Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 01/91] scsi: ufs: mcq: Fix memory allocation checks for SQE and CQE Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 02/91] firewire: core: fix overlooked update of subsystem ABI version Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 03/91] ALSA: usb-audio: Fix block comments in mixer_quirks Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 04/91] ALSA: usb-audio: Drop unnecessary parentheses " Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 05/91] ALSA: usb-audio: Avoid multiple assignments " Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 06/91] ALSA: usb-audio: Simplify NULL comparison " Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 07/91] ALSA: usb-audio: Remove unneeded wmb() " Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 08/91] ALSA: usb-audio: Add mixer quirk for Sony DualSense PS5 Greg Kroah-Hartman
2025-09-30 14:47 ` Greg Kroah-Hartman [this message]
2025-09-30 15:26 ` [PATCH 6.6 09/91] HID: multitouch: Get the contact ID from HID_DG_TRANSDUCER_INDEX fields in case of Apple Touch Bar Aditya Garg
2025-09-30 14:47 ` [PATCH 6.6 10/91] HID: multitouch: support getting the tip state from HID_DG_TOUCH fields in " Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 11/91] HID: multitouch: take cls->maxcontacts into account for Apple Touch Bar even without a HID_DG_CONTACTMAX field Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 12/91] HID: multitouch: specify that Apple Touch Bar is direct Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 13/91] ALSA: usb-audio: Convert comma to semicolon Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 14/91] ALSA: usb-audio: Fix build with CONFIG_INPUT=n Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 15/91] usb: core: Add 0x prefix to quirks debug output Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 16/91] mmc: sdhci-cadence: add Mobileye eyeQ support Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 17/91] i2c: designware: Add quirk for Intel Xe Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 18/91] ALSA: usb-audio: Add DSD support for Comtrue USB Audio device Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 19/91] ALSA: usb-audio: move mixer_quirks min_mute into common quirk Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 20/91] ALSA: usb-audio: Add mute TLV for playback volumes on more devices Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 21/91] IB/mlx5: Fix obj_type mismatch for SRQ event subscriptions Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 22/91] mm/gup: revert "mm: gup: fix infinite loop within __get_longterm_locked" Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 23/91] mm: add folio_expected_ref_count() for reference count calculation Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 24/91] mm/gup: check ref_count instead of lru before migration Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 25/91] mm/gup: local lru_add_drain() to avoid lru_add_drain_all() Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 26/91] mm: folio_may_be_lru_cached() unless folio_test_large() Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 27/91] arm64: dts: imx8mp: Correct thermal sensor index Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 28/91] ARM: dts: kirkwood: Fix sound DAI cells for OpenRD clients Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 29/91] cpufreq: Initialize cpufreq-based invariance before subsys Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 30/91] smb: server: dont use delayed_work for post_recv_credits_work Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 31/91] wifi: virt_wifi: Fix page fault on connect Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 32/91] can: rcar_can: rcar_can_resume(): fix s2ram with PSCI Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 33/91] bpf: Reject bpf_timer for PREEMPT_RT Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 34/91] xfrm: xfrm_alloc_spi shouldnt use 0 as SPI Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 35/91] can: etas_es58x: populate ndo_change_mtu() to prevent buffer overflow Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 36/91] can: hi311x: " Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 37/91] can: sun4i_can: " Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 38/91] can: mcba_usb: " Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 39/91] can: peak_usb: fix shift-out-of-bounds issue Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 40/91] ethernet: rvu-af: Remove slash from the driver name Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 41/91] Bluetooth: hci_sync: Fix hci_resume_advertising_sync Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 42/91] Bluetooth: hci_event: Fix UAF in hci_acl_create_conn_sync Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 43/91] vhost: Take a reference on the task in struct vhost_task Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 44/91] bnxt_en: correct offset handling for IPv6 destination address Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 45/91] net: allow alloc_skb_with_frags() to use MAX_SKB_FRAGS Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 46/91] nexthop: Forbid FDB status change while nexthop is in a group Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 47/91] selftests: fib_nexthops: Fix creation of non-FDB nexthops Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 48/91] net: dsa: lantiq_gswip: do also enable or disable cpu port Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 49/91] net: dsa: lantiq_gswip: move gswip_add_single_port_br() call to port_setup() Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 50/91] net: dsa: lantiq_gswip: suppress -EINVAL errors for bridge FDB entries added to the CPU port Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 51/91] octeontx2-pf: Fix potential use after free in otx2_tc_add_flow() Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 52/91] drm/gma500: Fix null dereference in hdmi teardown Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 53/91] futex: Prevent use-after-free during requeue-PI Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 54/91] smb: client: fix wrong index reference in smb2_compound_op() Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 55/91] HID: asus: add support for missing PX series fn keys Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 56/91] i40e: fix idx validation in i40e_validate_queue_map Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 57/91] i40e: fix idx validation in config queues msg Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 58/91] i40e: fix input validation logic for action_meta Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 59/91] i40e: fix validation of VF state in get resources Greg Kroah-Hartman
2025-09-30 14:47 ` [PATCH 6.6 60/91] i40e: add max boundary check for VF filters Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 61/91] i40e: add mask to apply valid bits for itr_idx Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 62/91] i40e: improve VF MAC filters accounting Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 63/91] crypto: af_alg - Fix incorrect boolean values in af_alg_ctx Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 64/91] tracing: dynevent: Add a missing lockdown check on dynevent Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 65/91] ARM: dts: socfpga: sodia: Fix mdio bus probe and PHY address Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 66/91] afs: Fix potential null pointer dereference in afs_put_server Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 67/91] kmsan: fix out-of-bounds access to shadow memory Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 68/91] mm/hugetlb: fix folio is still mapped when deleted Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 69/91] fbcon: fix integer overflow in fbcon_do_set_font Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 70/91] fbcon: Fix OOB access in font allocation Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 71/91] s390/cpum_cf: Fix uninitialized warning after backport of ce971233242b Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 72/91] ARM: bcm: Select ARM_GIC_V3 for ARCH_BRCMSTB Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 73/91] mm: migrate_device: use more folio in migrate_device_finalize() Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 74/91] mm/migrate_device: dont add folio to be freed to LRU " Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 75/91] loop: Avoid updating block size under exclusive owner Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 76/91] gpiolib: Extend software-node support to support secondary software-nodes Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 77/91] drm/ast: Use msleep instead of mdelay for edid read Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 78/91] i40e: increase max descriptors for XL710 Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 79/91] i40e: add validation for ring_len param Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 80/91] minmax: make generic MIN() and MAX() macros available everywhere Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 81/91] minmax: simplify min()/max()/clamp() implementation Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 82/91] minmax: dont use max() in situations that want a C constant expression Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 83/91] minmax: improve macro expansion and type checking Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 84/91] minmax: fix up min3() and max3() too Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 85/91] minmax.h: add whitespace around operators and after commas Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 86/91] minmax.h: update some comments Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 87/91] minmax.h: reduce the #define expansion of min(), max() and clamp() Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 88/91] minmax.h: use BUILD_BUG_ON_MSG() for the lo < hi test in clamp() Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 89/91] minmax.h: move all the clamp() definitions after the min/max() ones Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 90/91] minmax.h: simplify the variants of clamp() Greg Kroah-Hartman
2025-09-30 14:48 ` [PATCH 6.6 91/91] minmax.h: remove some #defines that are only expanded once Greg Kroah-Hartman
2025-09-30 18:37 ` [PATCH 6.6 00/91] 6.6.109-rc1 review Florian Fainelli
2025-09-30 18:49 ` Brett A C Sheffield
2025-09-30 19:56 ` [PATCH 6.6 00/91] " Peter Schneider
2025-10-01 2:57 ` Ron Economos
2025-10-01 9:11 ` Jon Hunter
2025-10-01 9:12 ` Jon Hunter
2025-10-01 10:15 ` Mark Brown
2025-10-01 10:22 ` Naresh Kamboju
2025-10-01 16:08 ` Shuah Khan
2025-10-01 17:20 ` Miguel Ojeda
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=20250930143821.504615260@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=bentiss@kernel.org \
--cc=gargaditya08@live.com \
--cc=jkosina@suse.com \
--cc=kekrby@gmail.com \
--cc=patches@lists.linux.dev \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
/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).