ASoC: dt-bindings: Fix TAS2563 address constraints
Subsystems (3)
Rob Herring (Arm)
maintainerPATCH 1/1 ASoC: dt-bindings: Fix TAS2563 address constraints
Apply the TAS2781 register range only when the compatible is exactly ti,tas2781. This avoids applying the TAS2781 single-address rule to TAS2563 nodes with 0x4c-0x4f addresses.
--- Documentation/devicetree/bindings/sound/ti,tas2781.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
Documentation/devicetree/bindings/sound/ti,tas2781.yaml +1 -3
@@ -219,9 +219,7 @@ allOf: - if: properties: compatible: - contains: - enum: - - ti,tas2781 + const: ti,tas2781 then: properties: reg:
Signature · 1 line
2.53.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] dt-bindings: ti,tas2781: silent schema failure from scalar const on compatible --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: ti,tas2781: silent schema failure from scalar const on compatible --
commit c73c1b75f173e00cf5a4898fb3f42699d6a9f494
Author: Rob Herring (Arm) <[email protected]>
ASoC: dt-bindings: Fix TAS2563 address constraints
This commit modifies the conditional block for the TAS2781 device to apply the register range only when the compatible string is exactly ti,tas2781. This is intended to prevent the TAS2781 single-address rule from incorrectly applying to TAS2563 nodes.
Documentation/devicetree/bindings/sound/ti,tas2781.yaml allOf: · line 222
Quoted 12 lines
Documentation/devicetree/bindings/sound/ti,tas2781.yaml +1
-3@@ -219,9 +219,7 @@ allOf: - if: properties: compatible: - contains: - enum: - - ti,tas2781 + const: ti,tas2781
[Severity: Medium]
Will this scalar const constraint on the compatible property cause the schema validation to silently fail?
Looking at the allOf.if.properties.compatible evaluation, the compatible property is always parsed and evaluated as a string array (e.g., ["ti,tas2781"]). Because JSON Schema const performs strict equality validation, checking a string array against a scalar string will evaluate to false for all nodes.
Consequently, it looks like the then block enforcing the reg constraints will never be applied when checking device tree nodes. Should this use
contains: const: ti,tas2781 instead to correctly match elements within the array?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Mark Brown
maintainerQuoted 1 line · Rob Herring (Arm)
ASoC: dt-bindings: Fix TAS2563 address constraints
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.4
Thanks!
[1/1] ASoC: dt-bindings: Fix TAS2563 address constraints
https://git.kernel.org/broonie/sound/c/87dd248876d1
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark