]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
power: reset: tdx-ec-poweroff: fix restart
authorEmanuele Ghidoli <emanuele.ghidoli@toradex.com>
Fri, 30 Jan 2026 07:11:35 +0000 (08:11 +0100)
committerSasha Levin <sashal@kernel.org>
Wed, 4 Mar 2026 12:21:19 +0000 (07:21 -0500)
commit491f04be585c6295e4de8648b65cbaaf1989e98d
tree65773a926d7f3476c1d145f363912e30d0faff9e
parentbc1492651253e59936eab1858efa9033c8086ed7
power: reset: tdx-ec-poweroff: fix restart

[ Upstream commit 562357a6310f79e45844c3e980d410a1e8e02ce6 ]

During testing, restart occasionally failed on Toradex modules.

The issue was traced to an interaction between the EC-based reset/poweroff
handler and the PSCI restart handler. While the embedded controller is
resetting or powering off the module, the PSCI code may still be invoked,
triggering an I2C transaction to the PMIC. This can leave the PMIC I2C
in a frozen state.

Add a delay after issuing the EC reset or power-off command to give the
controller time to complete the operation and avoid falling back to another
restart/poweroff provider.

Also print an error message if sending the command to the embedded controller
fails.

Fixes: 18672fe12367 ("power: reset: add Toradex Embedded Controller")
Cc: stable@vger.kernel.org
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://patch.msgid.link/20260130071208.1184239-1-ghidoliemanuele@gmail.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/power/reset/tdx-ec-poweroff.c