Input: goodix - defer probe when externally reset controller does not answer#7482
Input: goodix - defer probe when externally reset controller does not answer#7482agners wants to merge 1 commit into
Conversation
… 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>
77ec19b to
3824f43
Compare
|
It seems I can drop the tag or add some note inline in the commit message if preferred. |
|
You can leave it as-is - the warning is about the commit message, not the code, so we should only see it once per branch for the older kernels. |
6by9
left a comment
There was a problem hiding this comment.
home-assistant/operating-system#4846 says that HAOS 18.0 was OK but 18.1 isn't.
What kernel version were you using on 18.0 so that we can compare?
Generally device drivers don't implement retry paths in the probe should communication to the module fail, so more fundamentally we want to understand why the touch controller isn't responding.
| * Without reset/irq GPIOs the controller reset is sequenced | ||
| * externally (e.g. by the display MCU on the Raspberry Pi | ||
| * Touch Display 2) and the controller may simply not be out | ||
| * of reset yet. Defer probing so it is retried once the rest |
There was a problem hiding this comment.
The GT911 should be out of reset before goodix_i2c_test completes as the overlay includes
startup-delay-us = <50000>;
on the regulator, so that's at least 50ms, and then goodix_i2c_test includes a retry with 20ms timeout.
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.
Note: This addresses a regression observed on Home Assistant OS 18.1 (kernel 6.18.x), where the Goodix touch controller of the Raspberry Pi Touch Display 2 stopped probing with
I2C communication failure: -5, see home-assistant/operating-system#4846.Related reports of the same failure signature:
Error reading 1 bytes from 0x8140: -5,probe with driver Goodix-TS failed with error -5; thermmod goodix_ts && modprobe goodix_tsworkaround reported there is the manual equivalent of the deferred probe retry): https://forums.raspberrypi.com/viewtopic.php?t=389937I2C communication failure: -6) on Pi 5 with a Waveshare panel: RPI 5 - Goodix capacitive touchscreen not working on latest Kernel #6456This is untested on my end, but it seems a very plausible fix. Hence I did not send it upstream for now — but since the affected code path is unmodified mainline code, if this turns out to be the correct fix, anyone is welcome to pick it up and upstream it.
Note on the advisory checkpatch failure: the commit uses the
Assisted-by: AGENT_NAME:MODEL_VERSIONtag as accepted by current mainline checkpatch/docs; the 6.18-based checkpatch here predates that tag, hence the warning/error.🤖 Generated with Claude Code