From: Kristian Mide <kristian@mide.dk>
To: dmitry.torokhov@gmail.com
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Kristian Mide <kristian@mide.dk>
Subject: [PATCH 2/2] Input: ilitek_ts: ratelimit unexpected report logging
Date: Fri, 26 Jun 2026 23:42:48 +0200 [thread overview]
Message-ID: <20260626214248.5563-3-kristian@mide.dk> (raw)
In-Reply-To: <20260626214248.5563-1-kristian@mide.dk>
Unexpected report IDs can repeat quickly when the controller
emits unknown packets.
Use dev_err_ratelimited() and include the first 16 bytes of the
raw packet to keep dmesg usable while preserving enough context
for debugging.
---
drivers/input/touchscreen/ilitek_ts_i2c.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/ilitek_ts_i2c.c b/drivers/input/touchscreen/ilitek_ts_i2c.c
index f0721af02..8886bd39b 100644
--- a/drivers/input/touchscreen/ilitek_ts_i2c.c
+++ b/drivers/input/touchscreen/ilitek_ts_i2c.c
@@ -241,7 +241,9 @@ static int ilitek_process_and_report_v6(struct ilitek_ts_data *ts)
return ilitek_process_pen_report(ts, buf);
if (buf[0] != ILITEK_TP_I2C_REPORT_ID) {
- dev_err(dev, "get touch info failed. Wrong id: 0x%02X\n", buf[0]);
+ dev_err_ratelimited(dev,
+ "get touch info failed. Wrong id: 0x%02X raw[0:16]=%*ph\n",
+ buf[0], 16, buf);
return -EINVAL;
}
--
2.54.0
next prev parent reply other threads:[~2026-06-26 21:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-26 21:42 [PATCH 0/2] Input: ilitek_ts: add stylus support for 0x0c reports Kristian Mide
2026-06-26 21:42 ` [PATCH 1/2] Input: ilitek_ts: add stylus input support Kristian Mide
2026-06-26 21:56 ` sashiko-bot
2026-06-26 21:42 ` Kristian Mide [this message]
2026-06-26 21:56 ` [PATCH 2/2] Input: ilitek_ts: ratelimit unexpected report logging sashiko-bot
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=20260626214248.5563-3-kristian@mide.dk \
--to=kristian@mide.dk \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@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