From: "André Draszik" <andre.draszik@linaro.org>
To: Lee Jones <lee@kernel.org>
Cc: Tudor Ambarus <tudor.ambarus@linaro.org>,
Rob Herring <robh@kernel.org>, Conor Dooley <conor+dt@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Peter Griffin <peter.griffin@linaro.org>,
Will McVicker <willmcvicker@google.com>,
kernel-team@android.com, linux-kernel@vger.kernel.org,
linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org,
linux-gpio@vger.kernel.org
Subject: Re: [PATCH 07/17] mfd: sec-common: Instantiate s2mpg10 bucks and ldos separately
Date: Fri, 13 Jun 2025 15:52:49 +0100 [thread overview]
Message-ID: <17434d4ceae1e65a5151bb1308b8e49dbbdaf021.camel@linaro.org> (raw)
In-Reply-To: <05b9862c9a8f11bf7d7c8afdf60ecff30716a196.camel@linaro.org>
On Fri, 2025-06-13 at 15:49 +0100, André Draszik wrote:
> Hi Lee,
>
> Thanks for your review!
>
> On Fri, 2025-06-13 at 15:19 +0100, Lee Jones wrote:
> > On Wed, 04 Jun 2025, André Draszik wrote:
> >
> > > Bucks can conceivably be used as supplies for LDOs, which means we need
> > > to instantiate them separately from each other so that the supply-
> > > consumer links can be resolved successfully at probe time.
> > >
> > > By doing so, the kernel will defer and retry instantiating the LDOs
> > > once BUCKs have been created while without this change, it can be
> > > impossible to mark BUCKs as LDO supplies. This becomes particularly
> > > an issue with the upcoming support for the S2MPG11 PMIC, where
> > > typically certain S2MP10/11 buck rails supply certain S2MP11/10 LDO
> > > rails.
> > >
> > > The platform_device's ::id field is used to inform the regulator driver
> > > which type of regulators (buck or ldo) to instantiate.
> >
> > I'm confused.
> >
> > There is nothing that differentiates the two, so why do you need to?
>
> On gs101, we have two PMICs, s2mpg10 and s2mpg11. Several s2mpg10 LDOs
> are consumers of various s2mpg10 bucks & s2mpg10 bucks, and several
Small typo, should read:
... Several s2mpg10 LDOs are consumers of various s2mpg10 bucks & s2mpg11
bucks...
> s2mpg11 LDOs are also supplied by various s2mpg10 bucks & s2mpg11 bucks.
>
> So we have a circular dependency here. LDOs of one PMIC depend on bucks
> of the other.
>
> If all s2mpg10 rails are handled by the same instance of the s2mpg10
> regulator driver, probe will defer (and ultimately fail), because the
> supplies to the LDOs can not be resolved during probe.
>
> The same goes for s2mpg11.
>
> The result is that neither driver can probe successfully (unless you're
> _extremely_ lucky due to parallel probing, but we can not rely on that,
> of course).
>
> By splitting LDO and buck rails into separate instances, this circular
> dependency is gone, the buck-instance of each respective driver can probe,
> which then allows the LDO instance of the other driver to probe.
>
> Does that answer the question, or did I misunderstand it?
>
>
> Cheers,
> Andre'
next prev parent reply other threads:[~2025-06-13 14:52 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-04 15:25 [PATCH 00/17] Samsung S2MPG10 regulator and S2MPG11 PMIC drivers André Draszik
2025-06-04 15:25 ` [PATCH 01/17] dt-bindings: firmware: google,gs101-acpm-ipc: convert regulators to lowercase André Draszik
2025-06-04 15:25 ` [PATCH 02/17] regulator: dt-bindings: add s2mpg10-pmic regulators André Draszik
2025-06-04 15:25 ` [PATCH 03/17] regulator: dt-bindings: add s2mpg11-pmic regulators André Draszik
2025-06-04 15:25 ` [PATCH 04/17] dt-bindings: mfd: samsung,s2mps11: add s2mpg10-pmic regulators André Draszik
2025-06-04 15:25 ` [PATCH 05/17] dt-bindings: mfd: samsung,s2mps11: add s2mpg11-pmic André Draszik
2025-06-04 15:25 ` [PATCH 06/17] dt-bindings: firmware: google,gs101-acpm-ipc: update PMIC examples André Draszik
2025-06-04 15:26 ` André Draszik
2025-06-04 15:25 ` [PATCH 07/17] mfd: sec-common: Instantiate s2mpg10 bucks and ldos separately André Draszik
2025-06-13 14:19 ` Lee Jones
2025-06-13 14:49 ` André Draszik
2025-06-13 14:52 ` André Draszik [this message]
2025-06-25 15:12 ` André Draszik
2025-06-04 15:25 ` [PATCH 08/17] mfd: sec: Add support for S2MPG11 PMIC via ACPM André Draszik
2025-06-13 14:22 ` Lee Jones
2025-06-04 15:25 ` [PATCH 09/17] regulator: s2mps11: drop two needless variable initialisations André Draszik
2025-06-04 15:25 ` [PATCH 10/17] regulator: s2mps11: use dev_err_probe() where appropriate André Draszik
2025-06-04 15:25 ` [PATCH 11/17] regulator: s2mps11: update node parsing (allow -supply properties) André Draszik
2025-06-04 15:25 ` [PATCH 12/17] regulator: s2mps11: refactor handling of external rail control André Draszik
2025-06-04 15:25 ` [PATCH 13/17] regulator: s2mps11: add S2MPG10 regulator André Draszik
2025-06-04 15:25 ` [PATCH 14/17] regulator: s2mps11: refactor S2MPG10 ::set_voltage_time() for S2MPG11 reuse André Draszik
2025-06-04 15:25 ` [PATCH 15/17] regulator: s2mps11: refactor S2MPG10 regulator macros " André Draszik
2025-06-04 15:25 ` [PATCH 16/17] regulator: s2mps11: add S2MPG11 regulator André Draszik
2025-06-04 15:25 ` [PATCH 17/17] regulator: s2mps11: more descriptive gpio consumer name André Draszik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17434d4ceae1e65a5151bb1308b8e49dbbdaf021.camel@linaro.org \
--to=andre.draszik@linaro.org \
--cc=brgl@bgdev.pl \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kernel-team@android.com \
--cc=krzk@kernel.org \
--cc=lee@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=peter.griffin@linaro.org \
--cc=robh@kernel.org \
--cc=tudor.ambarus@linaro.org \
--cc=willmcvicker@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).