lkml.org 
[lkml]   [2022]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] dt-bindings: Improve phandle-array schemas
On Mon, Jan 24, 2022 at 10:55 AM Krzysztof Kozlowski
<krzysztof.kozlowski@canonical.com> wrote:
>
> On Wed, 19 Jan 2022 at 02:50, Rob Herring <robh@kernel.org> wrote:
> >
> > 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.
>
> (...)
>
> > 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

\
 
 \ /
  Last update: 2022-01-25 04:09    [W:0.126 / U:0.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site