Skip to content

Commit 3824f43

Browse files
committed
Input: goodix - defer probe when externally reset controller does not answer
On some devices the reset line of the touch controller is sequenced by external logic rather than by GPIOs under control of the goodix driver. On the Raspberry Pi Touch Display 2, for example, the reset line is managed by a microcontroller on the display. In such configurations the driver has neither a reset GPIO nor access to the irq pin (IRQ_PIN_ACCESS_NONE), so when the initial I2C test fails there is no controller-reset retry path and probing fails permanently with -EIO. Whether the controller answers the first I2C test depends on probe timing relative to the external reset sequencing, which can shift between kernel versions and configurations. Return -EPROBE_DEFER in this case so probing is retried later, in particular after other drivers (such as the DSI panel driver behind which the display MCU is brought up) have been bound. Link: home-assistant/operating-system#4846 Assisted-by: Claude:claude-fable-5 Signed-off-by: Stefan Agner <stefan@agner.ch>
1 parent 7136f2b commit 3824f43

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

drivers/input/touchscreen/goodix.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,6 +1378,17 @@ static int goodix_ts_probe(struct i2c_client *client)
13781378
ts->reset_controller_at_probe = true;
13791379
goto reset;
13801380
}
1381+
/*
1382+
* Without reset/irq GPIOs the controller reset is sequenced
1383+
* externally (e.g. by the display MCU on the Raspberry Pi
1384+
* Touch Display 2) and the controller may simply not be out
1385+
* of reset yet. Defer probing so it is retried once the rest
1386+
* of the display stack has been brought up.
1387+
*/
1388+
if (ts->irq_pin_access_method == IRQ_PIN_ACCESS_NONE)
1389+
return dev_err_probe(&client->dev, -EPROBE_DEFER,
1390+
"I2C communication failure: %d\n",
1391+
error);
13811392
dev_err(&client->dev, "I2C communication failure: %d\n", error);
13821393
return error;
13831394
}

0 commit comments

Comments
 (0)