[RFC PATCH v3 2/3] mfd: rk8xx: Release the power hold GPIOs before powering off

Lee Jones lee at kernel.org
Thu Oct 15 06:46:16 PDT 2026


On Tue, 29 Sep 2026, Yaozhong Li wrote:

> rk808_power_off() writes the PMIC's shutdown bit directly. On boards where
> lines driven by the SoC gate the PMIC's power-off path, a shutdown
> performed this way does not stick: the rails drop and immediately come
> back up, so the board restarts instead of staying off. U-Boot reports the
> result as a power-on reset.
> 
> Take those lines as an optional GPIO array, hold them asserted while the
> system runs and release them - waiting power-hold-delay-ms - before
> writing the shutdown bit. Device trees without the property retain the
> existing behaviour.
> 
> The array is claimed before any child device is registered, so that a
> -EPROBE_DEFER from the GPIO provider does not tear down the regulators,
> RTC and clocks that devm_mfd_add_devices() has already registered.
> 
> On a Firefly-RK3399 the shutdown stuck when such a line went from high to
> low before the shutdown bit was written, and did not when the line was
> never driven.
> 
> Assisted-by: LLM
> Signed-off-by: Yaozhong Li <yaozhonguwl at gmail.com>

Why is this still an RFC?  That means it should not be applied.

-- 
Lee Jones



More information about the Linux-rockchip mailing list