From nobody Mon Jun 15 03:53:57 2026 Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD2633644DC for ; Wed, 8 Apr 2026 03:14:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775618092; cv=none; b=mZKFHkZtJGzHtmTjZJBrWOL8Xd/q0QhYsx4+vcM9Gax51k/wKtMZLqJQ7Qs7OQ5FopF+8xTU7umiXFsoVfnjIiIoKev8JdWb3neJ7G8t4iZi4Lih6gaX93ISoaQ5nxaf5DTm8jYMuoGPUndaoTSRa/OJzEOb13sF2wHJ4EQJjMw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775618092; c=relaxed/simple; bh=L5J6/lBVVUbJIitRNipw7vQuk0sM3jo9lwubqdP0Mdk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=T/GzkSmAtkJW7ujuR+D2hiGcqVaUus4/GKJB/Qpp5VggcpF+s1U2wOsBgUpssve0iZ/KH6MyTZz0Y4AM4fcvwGA5a1GV/VwZVpVr3aJQZCC+6BP4IY9F9Aw4T9U8mYcDYg5KZQLxvmrUqDln8ru6MmShKYMHPNqbj5WnfOsdgYQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=VYvyqC9u; arc=none smtp.client-ip=209.85.215.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VYvyqC9u" Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-c742b9b7727so174734a12.0 for ; Tue, 07 Apr 2026 20:14:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775618091; x=1776222891; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=IpbH4+lkTk1MyWcrbv0IyQEd4jFHXAG0okd3inJYf94=; b=VYvyqC9uIHzoYcJRGDnZCt4Y8+AGyIPHAzg1d8CkcTn5TK9l2Hj8gEFuOR6q1qtnWO duIScwmfPa+JTj9ehDqKaifzpnyfS3HGr53LN6KcGab+opeEBf+iNqjkoSQ6kUYnl+Zb TgHCkhniiyhk5uhq35MaBjVVx0V3uGhVJgRecWo5WWnvBG81rYwizovijDEW9IdVODiU w3TuvH57IJ2ynC7y0IJpS01sXPMB0BGNTGkFuHCzkwEotiPoovgGFMeVbdyzxebtMsXF IWoJNAtvh/Wx/EwgHj5l5te8wgIXTTGKpnufybndCBJNmKWAB79fgXHirKAM6FVFpBIq fZZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775618091; x=1776222891; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=IpbH4+lkTk1MyWcrbv0IyQEd4jFHXAG0okd3inJYf94=; b=qNZwUoogZGR/X4jhPXXxAZuEr+FGjOSanidfraGrjcX8Ld1+oaLB+OOHtr4vv9bPfS ytTH1uSdLDJrMYYgowH7N3ju5xR1E+2uAm9EZ8YvZ0nUNClsWf6zGXHfe+QUhGbYSXd+ /vteAQQC/7Tr9DjjpFP7UXX+4nefU4CUEkyfcnTsy8y0O5FFIFEBdDrg7fWANfXq2uQ1 cCOo32clk+qqwXv/ckmmiFPeQWqmwT9xu3I0e+1/EtkTam5vmuiZZM9MrKDLMxqJ43it wvHUzSOwarNwPcaK/ZkNXmjXr6y156XYOgXB5Nve6baGwez9q4Fohwl3eU4Ky6mOeEeS Jrug== X-Gm-Message-State: AOJu0YygakAXSXJoopCl7fDPR5DB0gcthKZuS5jGkfYZjNzdab6uGVLm FW8EwRTu84sPzTu5v09cq3z8VBVwLHsksWIymITkykJ+8sjFpc09hmkt X-Gm-Gg: AeBDietQa4L5wGw2LNzyjsOiGGerpf84dGUf0TKEq3n36uIUnYIhKykCmtnfxxRF5ub 7w8yxl18hahIHF0zteHGovXsmHeKtTgAmt7XI6joWDyCw0RruouOadLGIfdP1LcvPno3SShFT8X UCHMqdDaxyZ0iyagpr97reXu+FFAI0QthC46k9kWZqx92m/Im5MPqKrusBnt7CzBtORLWfX9Mzv j+El0HpYXi22V11XWUME/JlJIxu8/0UO9plW7hgXKXRRfxAtPLD9YJufmGOH/q3wYstJvAA2ctY mJeP511leZ/0MNage9tNKEGVv7lQphDxtvqU8+js6Nms+EVE+Rna7BzXMI2/S6kjIOnVyh8HUdu 2RqvQXHGRm/oaNsFEkviGvV6MSkpldhZ528Uzh1D85OB+k3hnyBdXENMmNPcrXQs1qeTzGDN+Xz mt6cxo02QkDzH3/qe5LS2qEs94m7XAvLhDWSRtJ20U+t0ppyA= X-Received: by 2002:a05:6a20:a122:b0:398:7daf:6d7e with SMTP id adf61e73a8af0-39f2d9e755dmr17523612637.17.1775618091015; Tue, 07 Apr 2026 20:14:51 -0700 (PDT) Received: from LAPTOP-3SN9PV9T ([42.112.110.201]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82d11cd2ce2sm18365467b3a.6.2026.04.07.20.14.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Apr 2026 20:14:50 -0700 (PDT) From: Thanh Nguyen To: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org, dmitry.torokhov@gmail.com, Thanh Nguyen Subject: [PATCH] Input: zinitix: don't use finger_mask as bitmask when reporting contacts Date: Tue, 7 Apr 2026 22:14:40 -0500 Message-ID: <20260408031440.955-1-thanhnguyxn07@gmail.com> X-Mailer: git-send-email 2.51.0.windows.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The zinitix touchscreen driver was treating touch_event.finger_mask as a bitmask to iterate through finger slots. However, on some devices (e.g., Samsung Galaxy A3 2015), finger_mask behaves as a finger count rather than a bitmask, causing multitouch to malfunction. Instead of relying on finger_mask as a bitmask, iterate through all possible finger slots and check if SUB_BIT_EXIST is set for each slot. This restores proper multitouch functionality on affected devices. Fixes: e941dc13fd (") Link: https://bugzilla.kernel.org/show_bug.cgi?id=3D221278 Signed-off-by: Thanh Nguyen --- drivers/input/touchscreen/zinitix.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/zinitix.c b/drivers/input/touchscree= n/zinitix.c index 716d6fa60..b80525443 100644 --- a/drivers/input/touchscreen/zinitix.c +++ b/drivers/input/touchscreen/zinitix.c @@ -445,7 +445,6 @@ static irqreturn_t zinitix_ts_irq_handler(int irq, void= *bt541_handler) struct bt541_ts_data *bt541 =3D bt541_handler; struct i2c_client *client =3D bt541->client; struct touch_event touch_event; - unsigned long finger_mask; __le16 icon_events; int error; int i; @@ -470,11 +469,12 @@ static irqreturn_t zinitix_ts_irq_handler(int irq, vo= id *bt541_handler) zinitix_report_keys(bt541, le16_to_cpu(icon_events)); } =20 - finger_mask =3D touch_event.finger_mask; - for_each_set_bit(i, &finger_mask, MAX_SUPPORTED_FINGER_NUM) { + /* Process all finger slots and check if they exist, rather than relying = on finger_mask as a bitmask. + * On some devices (e.g., Samsung A3 2015), finger_mask behaves as finger= count rather than bitmask. + * Only process contacts that are actually reported as existing. */ + for (i =3D 0; i < MAX_SUPPORTED_FINGER_NUM; i++) { const struct point_coord *p =3D &touch_event.point_coord[i]; =20 - /* Only process contacts that are actually reported */ if (p->sub_status & SUB_BIT_EXIST) zinitix_report_finger(bt541, i, p); } --=20 2.51.0.windows.2