Re: [PATCH 12/12] dt-bindings: iio: accel: Add ADIS16203 Inclinometer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 24 Jan 2023 09:39:10 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> wrote:

> On 23/01/2023 22:17, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> > 
> > There has been a driver in staging for quite a while.
> > Given we are now moving it to the main tree, time to make sure it
> > has binding documentation.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> > ---
> >  .../bindings/iio/accel/adi,adis16203.yaml     | 59 +++++++++++++++++++
> >  1 file changed, 59 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adis16203.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adis16203.yaml
> > new file mode 100644
> > index 000000000000..05c095247e10
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/accel/adi,adis16203.yaml
> > @@ -0,0 +1,59 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/accel/adi,adis16203.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: ADIS16203 Programmable 360 degree inclinometer
> > +
> > +maintainers:
> > +  - Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> > +
> > +properties:
> > +  compatible:
> > +    const: adi,adis16203
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    maxItems: 2
> > +
> > +  interrupt-names:  
> 
> maxItems (and probably minItems
> 
> > +    description:
> > +      Device has two configurable outputs, both of which may be used
> > +      as interrupt sources.
> > +    enum:  
> 
> This won't work. It's an list. You need:
> items:
>   enum:
>      .....

Gah. I'm still rubbish at writing these things. I guess I just
don't do them often enough.

> 
> > +      - dio0
> > +      - dio1
> > +
> > +  reset-gpios: true  
> 
> maxItems: 1
> 
> 
> > +
> > +  vdd-supply: true
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +
> > +allOf:
> > +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> > +
> > +unevaluatedProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/interrupt-controller/irq.h>
> > +    spi {
> > +        #address-cells = <1>;
> > +        #size-cells = <0>;
> > +        accelerometer@0 {
> > +            compatible = "adi,adis16201";
> > +            reg = <0>;
> > +            spi-max-frequency = <2500000>;
> > +            interrupt-parent = <&gpio0>;
> > +            interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
> > +            interrupt-names = "dio0";  
> 
> You require here two items, according to interrupts. Don't you miss
> minItems?

Indeed.

> 
> Also... if you tested the binding it would complain here.

I thought I had tested it (and fixed a few issues that showed up).
I guess something went wrong with with the final test.  Will investigate.

Thanks and sorry for the waste of time with the silly errors!

Jonathan


> 
> > +        };
> > +    };
> > +...
> > +  
> 
> Best regards,
> Krzysztof
> 




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux