From: sashiko-bot@kernel.org
To: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: robh@kernel.org, dri-devel@lists.freedesktop.org,
mfd@lists.linux.dev, lee@kernel.org, devicetree@vger.kernel.org,
conor+dt@kernel.org
Subject: Re: [PATCH 03/16] arm: dts: twl4030: add twl4030-regen child
Date: Sat, 11 Jul 2026 06:18:36 +0000 [thread overview]
Message-ID: <20260711061836.9293B1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <ca467f11b708be8529de5e25b0863dce0d7edbb6.1783749722.git.hns@goldelico.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The YAML binding schema fails to allow 'startup-delay-us', causing a conflict between driver probe requirements and dtbs_check validation.
- [Medium] Architectural flaw in Device Tree design: conflating a PMIC digital control signal with an external voltage regulator.
--
--- Patch [3]: [PATCH 03/16] arm: dts: twl4030: add twl4030-regen child ---
commit a39086d961abe1def74820ce0f67a5656f16f99d
Author: Grond <grond66@riseup.net>
arm: dts: twl4030: add twl4030-regen child
This is needed on some boards (for example, the Pandora), where REGEN is
used to drive external regulators.
> diff --git a/arch/arm/boot/dts/ti/omap/twl4030.dtsi b/arch/arm/boot/dts/ti/omap/twl4030.dtsi
> index 07b9ca942e78d..e6f80b8f0a731 100644
> --- a/arch/arm/boot/dts/ti/omap/twl4030.dtsi
> +++ b/arch/arm/boot/dts/ti/omap/twl4030.dtsi
> @@ -112,6 +112,20 @@ vsim: regulator-vsim {
> regulator-max-microvolt = <3000000>;
> };
>
> + regen: regulator-regen {
> + compatible = "ti,twl4030-regen";
> + /*
> + * Since REGEN is technically just a signal that actuates an
> + * external regulator, we do not know what voltage it will
[Severity: Medium]
Is there an architectural mismatch in how this external regulator is modeled?
The comment acknowledges that REGEN is just a control signal, but the driver
forces the PMIC's digital signal node to define the external component's
voltage parameters:
drivers/regulator/twl-regulator.c:twlreg_probe() {
if (c->min_uV == 0 || c->max_uV == 0) {
dev_err(&pdev->dev, "minimum or maximum regulator voltage zero in DT\n");
return -EINVAL;
}
}
Would it be more aligned with Device Tree principles to model the PMIC's
REGEN pin as an enable-gpio or a voltage-less switch, and define a separate
regulator-fixed node for the external regulator that uses REGEN to enable it?
> + * eventually have, or what it's on/off timing should be.
> + * Therefore, disable it here; boards that use it can override
> + * the status to "okay" once they have set the
> + * regulator-{min,max}-microvolt and startup-delay-us
> + * attributes.
> + */
[Severity: High]
Will this cause a conflict between driver probe requirements and the
dtbs_check validation?
Looking at twlreg_probe() in drivers/regulator/twl-regulator.c, the driver
explicitly requires the startup-delay-us property:
drivers/regulator/twl-regulator.c:twlreg_probe() {
ret = of_property_read_u32(pdev->dev.of_node, "startup-delay-us",
&info->desc.enable_time);
if (ret) {
dev_err(&pdev->dev, "no valid startup delay set in DT: %d\n", ret);
return ret;
}
}
However, the ti,twl.yaml binding schema introduces ti,twl4030-regen but fails
to add startup-delay-us to the allowed properties, leading to
unevaluatedProperties: false rejecting it during validation.
If board developers provide the property to satisfy the driver, they will
fail schema validation, but if they omit it to pass validation, the driver
will fail to probe at runtime. Can the schema be updated to allow this, or
is there a different expected behavior?
> + status = "disabled";
> + };
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1783749722.git.hns@goldelico.com?part=3
next prev parent reply other threads:[~2026-07-11 6:18 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-11 6:01 [PATCH 00/16] ARM: omap3: pandora: Modernize audio and backlight to Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
2026-07-11 6:01 ` [PATCH 01/16] dt-bindings: twl-regulator: Add bindings for exposing ti, twl4030-regen H. Nikolaus Schaller
2026-07-11 6:10 ` sashiko-bot
2026-07-11 6:01 ` [PATCH 02/16] regulator: twl: Expose the TWL4030's REGEN signal as a regulator H. Nikolaus Schaller
2026-07-11 6:16 ` sashiko-bot
2026-07-11 6:01 ` [PATCH 03/16] arm: dts: twl4030: add twl4030-regen child H. Nikolaus Schaller
2026-07-11 6:18 ` sashiko-bot [this message]
2026-07-11 6:01 ` [PATCH 04/16] arm: dts: omap3pandora: Populate DT data for the TWL4030's REGEN regulator H. Nikolaus Schaller
2026-07-11 6:19 ` sashiko-bot
2026-07-11 6:01 ` [PATCH 05/16] arm: dts: omap3pandora: Don't use DMA channels for unused SPI masters H. Nikolaus Schaller
2026-07-11 6:06 ` sashiko-bot
2026-07-11 6:01 ` [PATCH 06/16] ASoC: twl4030-codec: Allow setting APLL rate through the .set_sysclk() interface H. Nikolaus Schaller
2026-07-11 6:12 ` sashiko-bot
2026-07-11 6:01 ` [PATCH 07/16] ASoC: dt-bindings: add TI PCM1773 H. Nikolaus Schaller
2026-07-11 6:08 ` sashiko-bot
2026-07-11 7:39 ` Rob Herring (Arm)
2026-07-11 6:01 ` [PATCH 08/16] ASoC: pcm1773-codec: write a driver for the PCM1773 chip from TI H. Nikolaus Schaller
2026-07-11 6:14 ` sashiko-bot
2026-07-11 6:01 ` [PATCH 09/16] ASoC: dt-bindings: add OpenPandora Sound Card H. Nikolaus Schaller
2026-07-11 6:10 ` sashiko-bot
2026-07-11 7:39 ` Rob Herring (Arm)
2026-07-11 6:01 ` [PATCH 10/16] ASoC: omap3pandora: Rewrite sound card driver as a platform driver with DT H. Nikolaus Schaller
2026-07-11 6:15 ` sashiko-bot
2026-07-11 6:01 ` [PATCH 11/16] ARM: dts: omap3-pandora-common: Enable audio in/out (mcbsp4/2) H. Nikolaus Schaller
2026-07-11 6:17 ` sashiko-bot
2026-07-11 6:01 ` [PATCH 12/16] arm: dts: omap3pandora: Add device node for PCM1773 codec H. Nikolaus Schaller
2026-07-11 6:15 ` sashiko-bot
2026-07-11 6:02 ` [PATCH 13/16] arm: dts: omap3pandora: create new DT node for the sound card H. Nikolaus Schaller
2026-07-11 6:17 ` sashiko-bot
2026-07-11 6:02 ` [PATCH 14/16] arm: dts: omap3-pandora-common: backlight: switch to twl4030 pwm and pwm_bl H. Nikolaus Schaller
2026-07-11 6:15 ` sashiko-bot
2026-07-11 6:02 ` [PATCH 15/16] backlight: remove pandora_bl H. Nikolaus Schaller
2026-07-11 6:16 ` sashiko-bot
2026-07-11 6:02 ` [PATCH 16/16] arm: omap2: remove remaining pdata-quirks for pandora legacy devices H. Nikolaus Schaller
2026-07-11 6:13 ` sashiko-bot
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=20260711061836.9293B1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=hns@goldelico.com \
--cc=lee@kernel.org \
--cc=mfd@lists.linux.dev \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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