Thread (24 messages) 24 messages, 4 authors, 2023-03-21

Re: [PATCH v29 1/7] dt-bindings: mediatek: add ethdr definition for mt8195

flat view

From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Date: 2023-03-17 09:38:07
Also in: dri-devel, linux-devicetree, linux-mediatek, lkml

Il 17/03/23 10:03, Krzysztof Kozlowski ha scritto:
On 17/03/2023 08:55, Nancy Lin (林欣螢) wrote:
quoted
On Thu, 2023-03-16 at 12:36 +0100, Krzysztof Kozlowski wrote:
quoted
On 16/03/2023 10:53, AngeloGioacchino Del Regno wrote:
quoted
Hello Krzysztof, Nancy,

Since this series has reached v29, can we please reach an agreement
on the bindings
to use here, so that we can get this finally upstreamed?

I will put some examples to try to get this issue resolved.

### Example 1: Constrain the number of GCE entries to *seven* array
elements (7x4!)

    mediatek,gce-client-reg:
      $ref: /schemas/types.yaml#/definitions/phandle-array
      maxItems: 1
      description: The register of display function block to be set
by gce.
        There are 4 arguments in this property, gce node, subsys id,
offset and
        register size. The subsys id is defined in the gce header of
each chips
        include/dt-bindings/gce/<chip>-gce.h, mapping to the
register of display
        function block.
      items:
        minItems: 28
        maxItems: 28
        items:                     <----- this block doesn't seem to
get checked :\
          - description: phandle of GCE
          - description: GCE subsys id
          - description: register offset
          - description: register size
This is what we would like to have but it requires exception in
dtschema. Thus:
quoted

### Example 2: Don't care about constraining the number of
arguments

    mediatek,gce-client-reg:
      $ref: /schemas/types.yaml#/definitions/phandle-array
      maxItems: 1
      description: The register of display function block to be set
by gce.
        There are 4 arguments in this property, gce node, subsys id,
offset and
        register size. The subsys id is defined in the gce header of
each chips
        include/dt-bindings/gce/<chip>-gce.h, mapping to the
register of display
        function block.
use this.

Best regards,
Krzysztof

Hi Krzysztof, Angelo,

Thanks for the comment.
The Example 2 can pass dt_binding_check.

But the example in the binding has 7 items [1] and dts [2]. Does the
"maxItems: 1" affect any other schema or dts check?
Ah, then it should be maxItems: 7, not 1.
Keep in mind for your v30:

maxItems: 7 will pass - but only if minItems is *not* 7 :-)

-> (so, do not declare minItems, as default is 1) <-

Regards,
Angelo
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help