Re: [PATCH] dt-bindings: Improve phandle-array schemas

From
Rob Herring <robh@kernel.org>
Date
2022-01-25 00:30:05
Also in
alsa-devel, lkml
Reply to
Krzysztof Kozlowski, 2022-01-24
On Mon, Jan 24, 2022 at 10:55 AM Krzysztof Kozlowski
[off-list ref] wrote:
On Wed, 19 Jan 2022 at 02:50, Rob Herring [off-list ref] wrote:
quoted
The 'phandle-array' type is a bit ambiguous. It can be either just an
array of phandles or an array of phandles plus args. Many schemas for
phandle-array properties aren't clear in the schema which case applies
though the description usually describes it.
Hi Rob,

I have few questions below.

(...)
quoted
diff --git a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml
index 095775c598fa..3a4df2ce1728 100644
--- a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml
+++ b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml
@@ -21,8 +21,7 @@ properties:
     type: object
     properties:
       sound-dai:
-        $ref: /schemas/types.yaml#/definitions/phandle-array
-        maxItems: 1
+        $ref: /schemas/types.yaml#/definitions/phandle
         description: phandle to the I2S controller
     required:
       - sound-dai
This passes the example only because the example was simplified to
hide dtschema errors.

The cpu dai node is like:
cpu {
    sound-dai = <&i2s0 0>;
};

and this fails with errors missing phandle tag in 0.

I am converting rest of Samsung audio bindings to dtschema and have
trouble expressing this. How schema should express such cpu node?
The above hunk should be reverted. I'll drop that hunk.


Rob
Thread (16 messages) 16 messages, 12 authors, last reply 2022-01-25
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help