From: Lee Jones <lee@kernel.org>
To: "André Draszik" <andre.draszik@linaro.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:19:02 +0100 [thread overview]
Message-ID: <20250613141902.GI897353@google.com> (raw)
In-Reply-To: <20250604-s2mpg1x-regulators-v1-7-6038740f49ae@linaro.org>
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?
> Signed-off-by: André Draszik <andre.draszik@linaro.org>
> ---
> drivers/mfd/sec-common.c | 4 +++-
> include/linux/mfd/samsung/s2mpg10.h | 5 +++++
> 2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/sec-common.c b/drivers/mfd/sec-common.c
> index 42d55e70e34c8d7cd68cddaecc88017e259365b4..8a1694c6ed8708397a51ebd4a49c22387d7e3495 100644
> --- a/drivers/mfd/sec-common.c
> +++ b/drivers/mfd/sec-common.c
> @@ -14,6 +14,7 @@
> #include <linux/mfd/core.h>
> #include <linux/mfd/samsung/core.h>
> #include <linux/mfd/samsung/irq.h>
> +#include <linux/mfd/samsung/s2mpg10.h>
> #include <linux/mfd/samsung/s2mps11.h>
> #include <linux/mfd/samsung/s2mps13.h>
> #include <linux/module.h>
> @@ -35,7 +36,8 @@ static const struct mfd_cell s2dos05_devs[] = {
>
> static const struct mfd_cell s2mpg10_devs[] = {
> MFD_CELL_NAME("s2mpg10-meter"),
> - MFD_CELL_NAME("s2mpg10-regulator"),
> + MFD_CELL_BASIC("s2mpg10-regulator", NULL, NULL, 0, S2MPG10_REGULATOR_CELL_ID_BUCKS),
> + MFD_CELL_BASIC("s2mpg10-regulator", NULL, NULL, 0, S2MPG10_REGULATOR_CELL_ID_LDOS),
> MFD_CELL_NAME("s2mpg10-rtc"),
> MFD_CELL_OF("s2mpg10-clk", NULL, NULL, 0, 0, "samsung,s2mpg10-clk"),
> MFD_CELL_OF("s2mpg10-gpio", NULL, NULL, 0, 0, "samsung,s2mpg10-gpio"),
> diff --git a/include/linux/mfd/samsung/s2mpg10.h b/include/linux/mfd/samsung/s2mpg10.h
> index 9f5919b89a3c286bf1cd6b3ef0e74bc993bff01a..3e8bc65078472518c5e77f8bd199ee403eda18ea 100644
> --- a/include/linux/mfd/samsung/s2mpg10.h
> +++ b/include/linux/mfd/samsung/s2mpg10.h
> @@ -8,6 +8,11 @@
> #ifndef __LINUX_MFD_S2MPG10_H
> #define __LINUX_MFD_S2MPG10_H
>
> +enum s2mpg10_regulator_mfd_cell_id {
> + S2MPG10_REGULATOR_CELL_ID_BUCKS = 1,
> + S2MPG10_REGULATOR_CELL_ID_LDOS = 2,
> +};
> +
> /* Common registers (type 0x000) */
> enum s2mpg10_common_reg {
> S2MPG10_COMMON_CHIPID,
>
> --
> 2.49.0.1204.g71687c7c1d-goog
>
--
Lee Jones [李琼斯]
next prev parent reply other threads:[~2025-06-13 14:19 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 [this message]
2025-06-13 14:49 ` André Draszik
2025-06-13 14:52 ` André Draszik
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=20250613141902.GI897353@google.com \
--to=lee@kernel.org \
--cc=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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.