On Fri, Mar 27, 2020 at 2:22 PM Sam Ravnborg <s...@ravnborg.org> wrote:
>
> Hi Rob.
>
> On Wed, Mar 25, 2020 at 04:05:38PM -0600, Rob Herring wrote:
> > The 'adi,adxl345' definition is a duplicate as there's a full binding in:
> > Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> >
> > The trivial-devices binding doesn't capture that 'adi,adxl346' has a
> > fallback compatible 'adi,adxl345', so let's add it to adi,adxl345.yaml.
> >
> > Cc: Michael Hennerich <michael.henner...@analog.com>
> > Cc: Jonathan Cameron <ji...@kernel.org>
> > Cc: Hartmut Knaack <knaac...@gmx.de>
> > Cc: Lars-Peter Clausen <l...@metafoo.de>
> > Cc: Peter Meerwald-Stadler <pme...@pmeerw.net>
> > Cc: linux-...@vger.kernel.org
> > Signed-off-by: Rob Herring <r...@kernel.org>
> > ---
> >  .../devicetree/bindings/iio/accel/adi,adxl345.yaml     | 10 +++++++---
> >  Documentation/devicetree/bindings/trivial-devices.yaml |  4 ----
> >  2 files changed, 7 insertions(+), 7 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml 
> > b/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> > index c602b6fe1c0c..d124eba1ce54 100644
> > --- a/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> > +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> > @@ -17,9 +17,13 @@ description: |
> >
> >  properties:
> >    compatible:
> > -    enum:
> > -      - adi,adxl345
> > -      - adi,adxl375
> > +    oneOf:
> > +      - items:
> > +          - const: adi,adxl346
> > +          - const: adi,adxl345
> > +      - enum:
> > +          - adi,adxl345
> > +          - adi,adxl375
>
> I assume it is my schema understanding that is poor.
> But I cannot parse the above.
>
> The mix of items, enum and const confuses me.

compatible can be one of 3 possibilities:
"adi,adxl346", "adi,adxl345"
"adi,adxl345"
"adi,adxl375"

For a single entry, 'items' can be omitted.

> I guess that if I am confused then others may end in the same situation.
> Can we improve readability here or amybe add a comment?

example-schema.yaml explains this to some extent. I'd rather improve that.

Rob
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to