Re: [RFC PATCH 2/3] mfd: rk8xx: release the power hold GPIOs before powering off
From: Lee Jones <lee@kernel.org>
Date: 2026-09-09 13:08:23
Also in:
sashiko-reviews
On Wed, 09 Sep 2026, sashiko-bot@kernel.org wrote:
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Medium] Acquiring 'power-hold' GPIOs after registering MFD child devices can cause probe deferral thrashing. - [Low] The commit message description violates the MFD subsystem formatting rules by using a lowercase letter.
Please review, explain or fix the Sashiko review(s). If this is a set, this request includes the other patches too.
-- commit 99f9b4ec1bb40a89a22b218c05cb3242225a6bc9 Author: Yaozhong Li [off-list ref] mfd: rk8xx: release the power hold GPIOs before powering off This commit adds support for "power hold" GPIO lines to the rk8xx driver. It acquires these lines during probe and releases them with a delay before the PMIC shutdown request is written.quoted
mfd: rk8xx: release the power hold GPIOs before powering off[Severity: Low] This isn't a functional bug, but the commit message subject violates the MFD subsystem formatting rules. The MFD guidelines require capitalizing the description after the subsystem prefix. Should "release" be updated to "Release"?quoted
diff --git a/drivers/mfd/rk8xx-core.c b/drivers/mfd/rk8xx-core.c index 3dcf6abfda74f..fd1efbb94008d 100644 --- a/drivers/mfd/rk8xx-core.c +++ b/drivers/mfd/rk8xx-core.c[ ... ]quoted
@@ -874,6 +894,15 @@ int rk8xx_probe(struct device *dev, int variant, unsigned int irq, struct regmap if (device_property_read_bool(dev, "system-power-controller") || device_property_read_bool(dev, "rockchip,system-power-controller")) { + rk808->power_hold_gpios = devm_gpiod_get_array_optional(dev, + "power-hold", GPIOD_OUT_HIGH); + if (IS_ERR(rk808->power_hold_gpios)) + return dev_err_probe(dev, PTR_ERR(rk808->power_hold_gpios), + "failed to get power hold GPIOs\n"); +[Severity: Medium] If the GPIO provider is not yet ready, devm_gpiod_get_array_optional() will return -EPROBE_DEFER. Because this acquisition occurs after devm_mfd_add_devices() has already run earlier in rk8xx_probe(), won't the resulting devres cleanup unregister all newly registered child devices (such as regulators, RTC, and clocks) while we wait for the GPIOs? Could the GPIO acquisition be moved earlier in the probe function, before the child devices are registered, to avoid probe deferral thrashing? -- Sashiko AI review · https://sashiko.dev/#/patchset/20260909092728.1859-1-yaozhonguwl@gmail.com?part=2
-- Lee Jones