Linux Input/HID development
 help / color / mirror / Atom feed
From: "Kaustabh Chakraborty" <kauschluss@disroot.org>
To: "Kaustabh Chakraborty" <kauschluss@disroot.org>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Cc: "Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Michael Srba" <Michael.Srba@seznam.cz>,
	"Linus Walleij" <linusw@kernel.org>,
	"Peter Griffin" <peter.griffin@linaro.org>,
	"Alim Akhtar" <alim.akhtar@samsung.com>,
	<linux-input@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-samsung-soc@vger.kernel.org>
Subject: Re: [PATCH 2/5] Input: zinitix - do not ignore non-moving fingers
Date: Wed, 29 Jul 2026 21:32:00 +0530	[thread overview]
Message-ID: <DKB6JC2T38OQ.11ELUOPIMUJ15@disroot.org> (raw)
In-Reply-To: <DKB6545IAUEM.31XPRNO2FNBPM@disroot.org>

On 2026-07-29 21:13 +05:30, Kaustabh Chakraborty wrote:
> On 2026-07-24 12:24 -07:00, Dmitry Torokhov wrote:
>> Hi Kaustabh,
>>
>> On Fri, Jul 24, 2026 at 12:54:04AM +0530, Kaustabh Chakraborty wrote:
>>> With the ZT7548 touchscreen present in the Galaxy J6, multitouch does not
>>> work reliably. This is due to the fact that the driver reports fingers
>>> only when their state is changed, so it's either placed against the
>>> scren, moved, or drawn away from the screen.
>>> 
>>> The function which is responsible for this is zinitix_report_finger().
>>> This function is called from the IRQ handler, under the following
>>> condition:
>>> 
>>> 		if (p->sub_status & SUB_BIT_EXIST)
>>> 			zinitix_report_finger(bt541, i, p);
>>> 
>>> This implies and ensures that every valid finger must have the
>>> SUB_BIT_EXIST flag.
>>> 
>>> However, at the beginning of the function, it refuses to recognize any
>>> finger if it has none of SUB_BIT_UP | SUB_BIT_DOWN | SUB_BIT_MOVE. This
>>> excludes fingers in reports which do not move from the position since
>>> the previous interrupt. Add SUB_BIT_EXIST to the list of valid bits.
>>
>> This makes the check basically a no-op as SUB_BIT_EXIST would always be
>> set when we reach this function. It may very well be that we want to
>> delete this check altogether, or maybe we need to add SUB_BIT_UPDATE and
>> SUB_BIT_WAIT. I am curious what status bits you see when this condition
>> (original) triggers for you...
>
> I see 0x03 [EXIST | DOWN] when the finger touches the screen, and 0x05
> [EXIST | MOVE] when it moves. When it stays in the same place (this is
> triggered in multitouch where one finger moves generating an event but
> the other is stagnant) it reports 0x01 [EXIST]. When it's lifted up it
> reports 0x08 [UP].
>
> It looks like report_finger() is meant to be called when the finger is
> up but it isn't because EXIST is not set during the UP event. So I guess
> the solution is to remove the guard in the IRQ func and call
> report_finger() unconditionally.

Actually no, interrupts are also called with 0x00 which should not be
used for reporting instead. So:

		if (p->sub_status)
			zinitix_report_finger(bt541, i, p);

>>> 
>>> Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
>>> ---
>>>  drivers/input/touchscreen/zinitix.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>> 
>>> diff --git a/drivers/input/touchscreen/zinitix.c b/drivers/input/touchscreen/zinitix.c
>>> index 3421b8ffb19b..fdcb80f52c91 100644
>>> --- a/drivers/input/touchscreen/zinitix.c
>>> +++ b/drivers/input/touchscreen/zinitix.c
>>> @@ -406,7 +406,7 @@ static void zinitix_report_finger(struct bt541_ts_data *bt541, int slot,
>>>  	u16 x, y;
>>>  
>>>  	if (unlikely(!(p->sub_status &
>>> -		       (SUB_BIT_UP | SUB_BIT_DOWN | SUB_BIT_MOVE)))) {
>>> +		       (SUB_BIT_EXIST | SUB_BIT_UP | SUB_BIT_DOWN | SUB_BIT_MOVE)))) {
>>>  		dev_dbg(&bt541->client->dev, "unknown finger event %#02x\n",
>>>  			p->sub_status);
>>>  		return;
>>> 
>>
>> Thanks.


  reply	other threads:[~2026-07-29 16:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23 19:24 [PATCH 0/5] Support zinitix touch modes 0 and 1, dt changes to Galaxy J6 (j6lte) Kaustabh Chakraborty
2026-07-23 19:24 ` [PATCH 1/5] Input: zinitix - check all available fingers for every touch event Kaustabh Chakraborty
2026-07-23 19:33   ` sashiko-bot
2026-07-29  7:44   ` Linus Walleij
2026-07-23 19:24 ` [PATCH 2/5] Input: zinitix - do not ignore non-moving fingers Kaustabh Chakraborty
2026-07-23 19:32   ` sashiko-bot
2026-07-24 19:24   ` Dmitry Torokhov
2026-07-29 15:43     ` Kaustabh Chakraborty
2026-07-29 16:02       ` Kaustabh Chakraborty [this message]
2026-07-23 19:24 ` [PATCH 3/5] Input: zinitix - add support for modes 0 and 1 Kaustabh Chakraborty
2026-07-23 19:33   ` sashiko-bot
2026-07-24 19:25   ` Dmitry Torokhov
2026-07-23 19:24 ` [PATCH 4/5] dt-bindings: input/ts/zinitix: document mode 0 Kaustabh Chakraborty
2026-07-24  9:56   ` Krzysztof Kozlowski
2026-07-29  7:47   ` Linus Walleij
2026-07-23 19:24 ` [PATCH 5/5] arm64: dts: exynos7870-j6lte: set mode 0 as default for zinitix touchscreen Kaustabh Chakraborty
2026-07-29  7:43   ` Linus Walleij
2026-07-29  7:46 ` [PATCH 0/5] Support zinitix touch modes 0 and 1, dt changes to Galaxy J6 (j6lte) Linus Walleij

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=DKB6JC2T38OQ.11ELUOPIMUJ15@disroot.org \
    --to=kauschluss@disroot.org \
    --cc=Michael.Srba@seznam.cz \
    --cc=alim.akhtar@samsung.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=peter.griffin@linaro.org \
    --cc=robh@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