* [PATCH] dt-bindings: mfd: ti,bq25703a: Expand to include BQ25798
@ 2026-09-14 13:48 Alexey Charkov
2026-09-14 14:08 ` sashiko-bot
0 siblings, 1 reply; 3+ messages in thread
From: Alexey Charkov @ 2026-09-14 13:48 UTC (permalink / raw)
To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Chris Morgan
Cc: mfd, devicetree, linux-kernel, Alexey Charkov
TI has unpublished the BQ25792 charger variant and pulled its docs from
their website.
BQ25798 is a pin and register compatible replacement, which also adds MPPT
tracking support (reg 0x15, added in BQ25798 and reserved in BQ25792) and
backup mode (reg 0x0f[1], reg 0x10[7:6], reg 0x16[0] and reg 0x1c[7:5] on
BQ25798 - all of them reserved on BQ25792).
Expand the existing binding to include BQ25798 with a fallback compatible
to BQ25792.
Link: https://www.ti.com/product/BQ25798
Signed-off-by: Alexey Charkov <alchark@flipper.net>
---
Documentation/devicetree/bindings/mfd/ti,bq25703a.yaml | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/mfd/ti,bq25703a.yaml b/Documentation/devicetree/bindings/mfd/ti,bq25703a.yaml
index cdce83f05804..43afd232a614 100644
--- a/Documentation/devicetree/bindings/mfd/ti,bq25703a.yaml
+++ b/Documentation/devicetree/bindings/mfd/ti,bq25703a.yaml
@@ -11,9 +11,14 @@ maintainers:
properties:
compatible:
- enum:
- - ti,bq25703a
- - ti,bq25792
+ oneOf:
+ - enum:
+ - ti,bq25703a
+ - ti,bq25792
+ - items:
+ - enum:
+ - ti,bq25798
+ - const: ti,bq25792
reg:
const: 0x6b
---
base-commit: 68142f986ff04b2b70b31db00f719bf690f64a9a
change-id: 20260914-bq25798-67768a40517e
Best regards,
--
Alexey Charkov <alchark@flipper.net>
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] dt-bindings: mfd: ti,bq25703a: Expand to include BQ25798
2026-09-14 13:48 [PATCH] dt-bindings: mfd: ti,bq25703a: Expand to include BQ25798 Alexey Charkov
@ 2026-09-14 14:08 ` sashiko-bot
2026-09-14 14:26 ` Alexey Charkov
0 siblings, 1 reply; 3+ messages in thread
From: sashiko-bot @ 2026-09-14 14:08 UTC (permalink / raw)
To: Alexey Charkov; +Cc: mfd, robh, conor+dt, lee, devicetree
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Adding an array-based fallback compatible string without updating the `if: properties: compatible: const:` conditionals causes the new compatible to bypass device-specific schema constraints.
--
commit 37d04d6cb52639a3cc4ba9ade1878fa540a5cb3e
Author: Alexey Charkov <alchark@flipper.net>
dt-bindings: mfd: ti,bq25703a: Expand to include BQ25798
TI has unpublished the BQ25792 charger variant and pulled its docs from
their website. BQ25798 is a pin and register compatible replacement. Expand
the existing binding to include BQ25798 with a fallback compatible to
BQ25792.
Link: https://www.ti.com/product/BQ25798
> diff --git a/Documentation/devicetree/bindings/mfd/ti,bq25703a.yaml b/Documentation/devicetree/bindings/mfd/ti,bq25703a.yaml
> index cdce83f058041..43afd232a6142 100644
> --- a/Documentation/devicetree/bindings/mfd/ti,bq25703a.yaml
> +++ b/Documentation/devicetree/bindings/mfd/ti,bq25703a.yaml
> @@ -11,9 +11,14 @@ maintainers:
>
> properties:
> compatible:
> - enum:
> - - ti,bq25703a
> - - ti,bq25792
> + oneOf:
> + - enum:
> + - ti,bq25703a
> + - ti,bq25792
> + - items:
> + - enum:
> + - ti,bq25798
> + - const: ti,bq25792
[Severity: Medium]
Is this a regression that causes the new compatible string to bypass
device-specific schema constraints?
Later in the file's allOf/if section, there is an exact match condition
for the ti,bq25792 compatible string:
- if:
properties:
compatible:
const: ti,bq25792
Since the schema const keyword mandates strict equality, it will fail to
match the fallback array ["ti,bq25798", "ti,bq25792"]. As a result, if a
devicetree author specifies compatible = "ti,bq25798", "ti,bq25792" and
configures out-of-bounds regulator or current values, the device-specific
hardware constraints for ti,bq25792 will not be applied during validation.
Could this if condition be updated to use contains instead of const, or
otherwise include the new fallback array?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260914-bq25798-v1-1-dc5e2ec343c4@flipper.net?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] dt-bindings: mfd: ti,bq25703a: Expand to include BQ25798
2026-09-14 14:08 ` sashiko-bot
@ 2026-09-14 14:26 ` Alexey Charkov
0 siblings, 0 replies; 3+ messages in thread
From: Alexey Charkov @ 2026-09-14 14:26 UTC (permalink / raw)
To: sashiko-reviews; +Cc: mfd, robh, conor+dt, lee, devicetree
On Mon, Sep 14, 2026 at 6:08 PM <sashiko-bot@kernel.org> wrote:
>
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] Adding an array-based fallback compatible string without updating the `if: properties: compatible: const:` conditionals causes the new compatible to bypass device-specific schema constraints.
> --
>
> commit 37d04d6cb52639a3cc4ba9ade1878fa540a5cb3e
> Author: Alexey Charkov <alchark@flipper.net>
>
> dt-bindings: mfd: ti,bq25703a: Expand to include BQ25798
>
> TI has unpublished the BQ25792 charger variant and pulled its docs from
> their website. BQ25798 is a pin and register compatible replacement. Expand
> the existing binding to include BQ25798 with a fallback compatible to
> BQ25792.
>
> Link: https://www.ti.com/product/BQ25798
>
> > diff --git a/Documentation/devicetree/bindings/mfd/ti,bq25703a.yaml b/Documentation/devicetree/bindings/mfd/ti,bq25703a.yaml
> > index cdce83f058041..43afd232a6142 100644
> > --- a/Documentation/devicetree/bindings/mfd/ti,bq25703a.yaml
> > +++ b/Documentation/devicetree/bindings/mfd/ti,bq25703a.yaml
> > @@ -11,9 +11,14 @@ maintainers:
> >
> > properties:
> > compatible:
> > - enum:
> > - - ti,bq25703a
> > - - ti,bq25792
> > + oneOf:
> > + - enum:
> > + - ti,bq25703a
> > + - ti,bq25792
> > + - items:
> > + - enum:
> > + - ti,bq25798
> > + - const: ti,bq25792
>
> [Severity: Medium]
> Is this a regression that causes the new compatible string to bypass
> device-specific schema constraints?
>
> Later in the file's allOf/if section, there is an exact match condition
> for the ti,bq25792 compatible string:
>
> - if:
> properties:
> compatible:
> const: ti,bq25792
>
> Since the schema const keyword mandates strict equality, it will fail to
> match the fallback array ["ti,bq25798", "ti,bq25792"]. As a result, if a
> devicetree author specifies compatible = "ti,bq25798", "ti,bq25792" and
> configures out-of-bounds regulator or current values, the device-specific
> hardware constraints for ti,bq25792 will not be applied during validation.
>
> Could this if condition be updated to use contains instead of const, or
> otherwise include the new fallback array?
Fair point, will address in v2.
Best regards,
Alexey
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-14 14:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-14 13:48 [PATCH] dt-bindings: mfd: ti,bq25703a: Expand to include BQ25798 Alexey Charkov
2026-09-14 14:08 ` sashiko-bot
2026-09-14 14:26 ` Alexey Charkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox