* [PATCH] regulator: rpi-panel-attiny: Fix probe failure after a host cold boot
@ 2026-10-16 7:52 Tomi Valkeinen
2026-10-16 20:00 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Tomi Valkeinen @ 2026-10-16 7:52 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Dave Stevenson, Marek Vasut
Cc: Devarsh Thakkar, linux-kernel, Tomi Valkeinen
attiny_i2c_probe() reads REG_ID with attiny_i2c_read(), a function added
in commit e4a7e3f741f7 ("regulator/rpi-panel-attiny: Use two
transactions for I2C read") specifically for fixing REG_ID read failures
at probe.
On TI's BeagleY-AI (but also on other TI boards tested) with the
Raspberry Pi 7-inch touchscreen, the first I2C transfer to the attiny
after a cold boot of the board usually fails, so the probe fails.
Retrying the transfer once fixes the problem.
It is unclear why this happens, but as the earlier commit adding
attiny_i2c_read() shows, attiny seems to have i2c issues. It is not out
of the question that the issue could be on the TI i2c side, but as the
other i2c peripherals (like sensors) work fine, adding this workaround
to attiny driver feels sensible.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
---
drivers/regulator/rpi-panel-attiny-regulator.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/regulator/rpi-panel-attiny-regulator.c b/drivers/regulator/rpi-panel-attiny-regulator.c
index 3020839b9ef1..77da916852e1 100644
--- a/drivers/regulator/rpi-panel-attiny-regulator.c
+++ b/drivers/regulator/rpi-panel-attiny-regulator.c
@@ -249,7 +249,13 @@ static int attiny_i2c_read(struct i2c_client *client, u8 reg, unsigned int *buf)
msgs[0].len = ARRAY_SIZE(addr_buf);
msgs[0].buf = addr_buf;
+ /*
+ * The first transfer after a power-up of the host usually fails on
+ * (at least) some TI boards, so retry the transfer on failure.
+ */
ret = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs));
+ if (ret != ARRAY_SIZE(msgs))
+ ret = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs));
if (ret != ARRAY_SIZE(msgs))
return -EIO;
---
base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907
change-id: 20261016-attiny-probe-fix-04e447327cf9
Best regards,
--
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: rpi-panel-attiny: Fix probe failure after a host cold boot
2026-10-16 7:52 [PATCH] regulator: rpi-panel-attiny: Fix probe failure after a host cold boot Tomi Valkeinen
@ 2026-10-16 20:00 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-10-16 20:00 UTC (permalink / raw)
To: Liam Girdwood, Dave Stevenson, Marek Vasut, Tomi Valkeinen
Cc: Devarsh Thakkar, linux-kernel
On Fri, 16 Oct 2026 10:52:43 +0300, Tomi Valkeinen wrote:
> regulator: rpi-panel-attiny: Fix probe failure after a host cold boot
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-7.4
Thanks!
[1/1] regulator: rpi-panel-attiny: Fix probe failure after a host cold boot
https://git.kernel.org/broonie/regulator/c/ba83dd4a47bb
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-18 9:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-16 7:52 [PATCH] regulator: rpi-panel-attiny: Fix probe failure after a host cold boot Tomi Valkeinen
2026-10-16 20:00 ` Mark Brown
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®