From nobody Wed Feb 11 21:15:32 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7333BC7EE25 for ; Thu, 4 May 2023 17:37:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230120AbjEDRhL (ORCPT ); Thu, 4 May 2023 13:37:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230038AbjEDRge (ORCPT ); Thu, 4 May 2023 13:36:34 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CF225FEC; Thu, 4 May 2023 10:36:29 -0700 (PDT) Received: from jupiter.universe (dyndsl-091-248-211-176.ewe-ip-backbone.de [91.248.211.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sre) by madras.collabora.co.uk (Postfix) with ESMTPSA id 48F26660570D; Thu, 4 May 2023 18:36:25 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1683221785; bh=167nUJPaQ51u5ho/2UstluOaEMM5LZNNdaUekQZ3nm0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hE7MELyWsFw50ZH/pbcqiRhR9nqa0PzAzepuew6iOnT1wTluYjjpMPH/s30DLORDL +kdy6ZHgjjzO7EYRWUI6tPeQTtvloWCqc2m4nzQQ7F2fKxram61eQn/I0Bz9PznF0c UFYD69HFsnD3PZFQLOHVNqHBpFozTiQDdsqUMCwy74PYfDB+JoJXrdCUuuQTBU5yUI XmdFBDI+vnH8PTF0SrqgWttS1xFWihZ8iA5ALDmrQNrUVBxoV3uWW6M1IF1xPElkct HrrCeNzP18LuI6UEYaSushXULi8L25aQHfjTXRdguq74wae3BAoxxahUkYrRC/3n7y sSeJEpF8SbQ0A== Received: by jupiter.universe (Postfix, from userid 1000) id E89194807F8; Thu, 4 May 2023 19:36:20 +0200 (CEST) From: Sebastian Reichel To: Heiko Stuebner , Rob Herring , Krzysztof Kozlowski , Lee Jones Cc: Michael Turquette , Stephen Boyd , Linus Walleij , Mark Brown , Liam Girdwood , Alexandre Belloni , Alessandro Zummo , linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Reichel , kernel@collabora.com Subject: [PATCH v8 13/14] regulator: rk808: revert to synchronous probing Date: Thu, 4 May 2023 19:36:17 +0200 Message-Id: <20230504173618.142075-14-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230504173618.142075-1-sebastian.reichel@collabora.com> References: <20230504173618.142075-1-sebastian.reichel@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The rk808 driver registers a bunch of regulator devices in a loop. If one of the later regulators fails to register (usually because its input supply is not yet available) everything will be unrolled (i.e. previously registered regulators will be unregistered). With asynchronous registration there might already be consumers, though. We do not have the necessary infrastructure to properly unregister the consumer device, so this scenario should be avoided. First checking all input supplies or disallowing usage of the regulators until all are registered does not work, since there can be self-references (e.g. DCDC channels providing the supply of LDOs). The only sensible solution I found is registering the regulator devices asynchronously, so that we do not have to unroll. Since this is a major rework let's revert back to synchronous probing for now to fix the issue at hand. Signed-off-by: Sebastian Reichel --- drivers/regulator/rk808-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-= regulator.c index 71a1ca8b917e..5f14d6dd4593 100644 --- a/drivers/regulator/rk808-regulator.c +++ b/drivers/regulator/rk808-regulator.c @@ -1355,7 +1355,7 @@ static struct platform_driver rk808_regulator_driver = =3D { .probe =3D rk808_regulator_probe, .driver =3D { .name =3D "rk808-regulator", - .probe_type =3D PROBE_PREFER_ASYNCHRONOUS, + .probe_type =3D PROBE_FORCE_SYNCHRONOUS, }, }; =20 --=20 2.39.2