From a11753a89ec610768301d4070e10b8bd60fde8cd Mon Sep 17 00:00:00 2001 From: Haibo Chen <haibo.chen@nxp.com> Date: Wed, 8 Sep 2021 18:29:50 +0800 Subject: [PATCH] LF-4558-2 input: touch: goodix: change the i2c data length to a small one Do not need to read quite large data through i2c bus, accroding to driver logic, only need the first 8 byte data. So change this length to 9. Add this change also can fix one error on imx8ulp-evk board, because the touch is on rpmsg-i2c bus, rpmsg limitate the data size, can't be large than 14 byte. If config a large data size, will trigger i2c error. Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Acked-by: Jason Liu <jason.hui.liu@nxp.com> --- drivers/input/touchscreen/goodix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c index f304fd84bb9fbb..802430c0962846 100644 --- a/drivers/input/touchscreen/goodix.c +++ b/drivers/input/touchscreen/goodix.c @@ -932,7 +932,7 @@ static void goodix_read_config(struct goodix_ts_data *ts) int error; error = goodix_i2c_read(ts->client, ts->chip->config_addr, - ts->config, ts->chip->config_len); + ts->config, 9); if (error) { dev_warn(&ts->client->dev, "Error reading config: %d\n", error); -- GitLab