[PATCH 2/2] Input: ilitek_ts: ratelimit unexpected report logging

From: Kristian Mide

Date: Fri Jun 26 2026 - 17:45:28 EST


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