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 v3 3/3] Input: ilitek_ts: ratelimit unexpected report logging
Date: Thu, 23 Jul 2026 17:22:44 +0200 [thread overview]
Message-ID: <20260723152244.11252-4-kristian@mide.dk> (raw)
In-Reply-To: <20260723152244.11252-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.
Return success after logging the unexpected report ID so the IRQ
handler does not emit a second unratelimited error for the same
condition.
Signed-off-by: Kristian Mide <kristian@mide.dk>
---
drivers/input/touchscreen/ilitek_ts_i2c.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/input/touchscreen/ilitek_ts_i2c.c b/drivers/input/touchscreen/ilitek_ts_i2c.c
index a184d024d..2f1741d77 100644
--- a/drivers/input/touchscreen/ilitek_ts_i2c.c
+++ b/drivers/input/touchscreen/ilitek_ts_i2c.c
@@ -238,8 +238,10 @@ 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]);
- return -EINVAL;
+ dev_err_ratelimited(dev,
+ "get touch info failed. Wrong id: 0x%02X raw[0:16]=%*ph\n",
+ buf[0], 16, buf);
+ return 0;
}
report_max_point = buf[REPORT_COUNT_ADDRESS];
--
2.54.0
prev parent reply other threads:[~2026-07-23 15:23 UTC|newest]
Thread overview: 11+ 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:42 ` [PATCH 2/2] Input: ilitek_ts: ratelimit unexpected report logging Kristian Mide
2026-07-09 18:25 ` [PATCH v2 0/3] Input: ilitek_ts: add stylus support for 0x0c reports Kristian Mide
2026-07-09 18:26 ` [PATCH v2 1/3] Input: ilitek_ts: add stylus input support Kristian Mide
2026-07-09 18:26 ` [PATCH v2 2/3] Input: ilitek_ts: handle short I2C transfers Kristian Mide
2026-07-09 18:26 ` [PATCH v2 3/3] Input: ilitek_ts: ratelimit unexpected report logging Kristian Mide
2026-07-23 15:22 ` [PATCH v3 0/3] Input: ilitek_ts: add stylus support for 0x0c reports Kristian Mide
2026-07-23 15:22 ` [PATCH v3 1/3] Input: ilitek_ts: add stylus input support Kristian Mide
2026-07-23 15:22 ` [PATCH v3 2/3] Input: ilitek_ts: handle short I2C transfers Kristian Mide
2026-07-23 15:22 ` Kristian Mide [this message]
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=20260723152244.11252-4-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
all inboxes | Powered by JetHome®