All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Burri <markus.burri@mt.com>
To: linux-kernel@vger.kernel.org
Cc: Markus Burri <markus.burri@mt.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Henrik Rydberg <rydberg@bitmath.org>,
	linux-input@vger.kernel.org
Subject: [PATCH v0001 1/1] input/ts: ili210x: send abs-mt-pressure for untouched
Date: Tue, 17 Oct 2023 15:10:57 +0200	[thread overview]
Message-ID: <20231017131057.1034956-1-markus.burri@mt.com> (raw)

Send the ABS_MT_PRESSURE event in case of untouched with zero pressure.
Multitouch pressure is only sent on first touch.

Therefore send an ABS_MT_PRESSURE event in case of untouched with zero pressure.
This avoids that the next ABS_MT_PRESSURE event will
be filtered out by input_defuzz_abs_event() in input.c since the pressure
value has not changed.

Signed-off-by: Markus Burri <markus.burri@mt.com>
---
 drivers/input/touchscreen/ili210x.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/input/touchscreen/ili210x.c b/drivers/input/touchscreen/ili210x.c
index e9bd36a..6b79513 100644
--- a/drivers/input/touchscreen/ili210x.c
+++ b/drivers/input/touchscreen/ili210x.c
@@ -318,7 +318,8 @@ static bool ili210x_report_events(struct ili210x *priv, u8 *touchdata)
 			if (priv->chip->has_pressure_reg)
 				input_report_abs(input, ABS_MT_PRESSURE, z);
 			contact = true;
-		}
+		} else if (priv->chip->has_pressure_reg)
+			input_report_abs(input, ABS_MT_PRESSURE, 0);
 	}
 
 	input_mt_report_pointer_emulation(input, false);
-- 
2.39.2


             reply	other threads:[~2023-10-17 13:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-17 13:10 Markus Burri [this message]
2023-10-19 13:18 ` [v0001,1/1] input/ts: ili210x: send abs-mt-pressure for untouched gerz-1

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=20231017131057.1034956-1-markus.burri@mt.com \
    --to=markus.burri@mt.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rydberg@bitmath.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.