From: Robby Cai <robby.cai@nxp.com>
To: Conor Dooley <conor@kernel.org>
Cc: broonie@kernel.org, lgirdwood@gmail.com, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, andreas@kemnade.info,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
imx@lists.linux.dev
Subject: Re: [PATCH v2 2/2] regulator: fp9931: Fix handling of mandatory "vin" supply
Date: Mon, 16 Mar 2026 15:26:05 +0800 [thread overview]
Message-ID: <20260316072605.GA3683539@shlinux88> (raw)
In-Reply-To: <20260313-antler-unburned-3af789df6085@spud>
On Fri, Mar 13, 2026 at 05:24:31PM +0000, Conor Dooley wrote:
> On Fri, Mar 13, 2026 at 09:31:02PM +0800, Robby Cai wrote:
> > The FP9931 requires a mandatory "vin" power supply to operate.
> > Replace devm_regulator_get_optional() with devm_regulator_get() to
> > enforce this mandatory dependency.
> >
> > Fixes: 12d821bd13d42 ("regulator: Add FP9931/JD9930 driver")
> > Signed-off-by: Robby Cai <robby.cai@nxp.com>
> > ---
> > drivers/regulator/fp9931.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/regulator/fp9931.c b/drivers/regulator/fp9931.c
> > index 69b3c712e5d58..d4ba818ec2c15 100644
> > --- a/drivers/regulator/fp9931.c
> > +++ b/drivers/regulator/fp9931.c
> > @@ -444,7 +444,7 @@ static int fp9931_probe(struct i2c_client *client)
> > return dev_err_probe(&client->dev, PTR_ERR(data->regmap),
> > "failed to allocate regmap!\n");
> >
> > - data->vin_reg = devm_regulator_get_optional(&client->dev, "vin");
> > + data->vin_reg = devm_regulator_get(&client->dev, "vin");
>
> And this isn't an ABI break because the regulator core will invent a
> dummy regulator?
>
> What's the functional difference here?
>
Yes, this change does not introduce an ABI break.
If the DT already specifies the 'vin' supply, nothing changes.
If the DT omits 'vin', the previous driver treated that as "no regulator"
via devm_regulator_get_optional() [1]. After this change, the driver still
continues to probe; the regulator core reports that a dummy supply is
being used.
[1] The original handling of devm_regulator_get_optional() had a defect,
which v1 attempted to fix. Switching to devm_regulator_get() reflects
the actual hardware requirement.
Regards,
Robby
next prev parent reply other threads:[~2026-03-16 7:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 13:31 [PATCH v2 0/2] regulator: fp9931: Make vin-supply mandatory Robby Cai
2026-03-13 13:31 ` [PATCH v2 1/2] dt-bindings: regulator: fp9931: Make vin-supply property as required Robby Cai
2026-03-13 13:33 ` Mark Brown
2026-03-13 14:16 ` Andreas Kemnade
2026-03-13 14:38 ` Mark Brown
2026-03-13 17:24 ` Conor Dooley
2026-03-13 13:31 ` [PATCH v2 2/2] regulator: fp9931: Fix handling of mandatory "vin" supply Robby Cai
2026-03-13 17:24 ` Conor Dooley
2026-03-16 7:26 ` Robby Cai [this message]
2026-03-16 14:28 ` Andreas Kemnade
2026-03-13 13:31 ` [PATCH v2 0/2] regulator: fp9931: Make vin-supply mandatory Mark Brown
2026-03-13 16:27 ` Mark Brown
2026-03-16 7:31 ` Robby Cai
2026-03-16 18:56 ` Mark Brown
2026-03-17 18:08 ` Mark Brown
2026-03-17 19:00 ` Mark Brown
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=20260316072605.GA3683539@shlinux88 \
--to=robby.cai@nxp.com \
--cc=andreas@kemnade.info \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=imx@lists.linux.dev \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
/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