[PATCH 1/3] dt-bindings: iio: adc: Add docs for LTC2499

Ciprian Regus posted 3 patches 3 years, 7 months ago
There is a newer version of this series
[PATCH 1/3] dt-bindings: iio: adc: Add docs for LTC2499
Posted by Ciprian Regus 3 years, 7 months ago
Update the bindings documentation for ltc2497 to include the ltc2499.

Signed-off-by: Ciprian Regus <ciprian.regus@analog.com>
---
 Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml | 6 +++++-
 MAINTAINERS                                                 | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml
index c1772b568cd1..7bb30eafc543 100644
--- a/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml
@@ -13,10 +13,14 @@ description: |
   16bit ADC supporting up to 16 single ended or 8 differential inputs.
   I2C interface.
 
+  https://www.analog.com/media/en/technical-documentation/data-sheets/2497fb.pdf
+  https://www.analog.com/media/en/technical-documentation/data-sheets/2499fe.pdf
+
 properties:
   compatible:
-    const:
+    enum:
       lltc,ltc2497
+      lltc,ltc2499
 
   reg: true
   vref-supply: true
diff --git a/MAINTAINERS b/MAINTAINERS
index 9d7f64dc0efe..3c847619ceb1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1327,6 +1327,7 @@ W:	https://ez.analog.com/linux-software-drivers
 F:	Documentation/ABI/testing/sysfs-bus-iio-frequency-ad9523
 F:	Documentation/ABI/testing/sysfs-bus-iio-frequency-adf4350
 F:	Documentation/devicetree/bindings/iio/*/adi,*
+F:	Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml
 F:	Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml
 F:	drivers/iio/*/ad*
 F:	drivers/iio/adc/ltc249*
-- 
2.30.2
Re: [PATCH 1/3] dt-bindings: iio: adc: Add docs for LTC2499
Posted by Jonathan Cameron 3 years, 7 months ago
On Mon, 22 Aug 2022 15:51:04 +0300
Ciprian Regus <ciprian.regus@analog.com> wrote:

> Update the bindings documentation for ltc2497 to include the ltc2499.
> 
> Signed-off-by: Ciprian Regus <ciprian.regus@analog.com>
Looks fine to me.  Maybe a separate patch to add the ltc2496 binding
given the driver is included in this MAINTAINERS entry?
A random comment inline.

Jonathan

> ---
>  Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml | 6 +++++-
>  MAINTAINERS                                                 | 1 +
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml
> index c1772b568cd1..7bb30eafc543 100644
> --- a/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml
> @@ -13,10 +13,14 @@ description: |
>    16bit ADC supporting up to 16 single ended or 8 differential inputs.
>    I2C interface.
>  
> +  https://www.analog.com/media/en/technical-documentation/data-sheets/2497fb.pdf
> +  https://www.analog.com/media/en/technical-documentation/data-sheets/2499fe.pdf
> +
>  properties:
>    compatible:
> -    const:
> +    enum:
>        lltc,ltc2497
> +      lltc,ltc2499
>  
>    reg: true
>    vref-supply: true
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 9d7f64dc0efe..3c847619ceb1 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1327,6 +1327,7 @@ W:	https://ez.analog.com/linux-software-drivers
>  F:	Documentation/ABI/testing/sysfs-bus-iio-frequency-ad9523
>  F:	Documentation/ABI/testing/sysfs-bus-iio-frequency-adf4350
>  F:	Documentation/devicetree/bindings/iio/*/adi,*
> +F:	Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml
>  F:	Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml

Unrelated question, but why is this here given the wild cards above match?

>  F:	drivers/iio/*/ad*
>  F:	drivers/iio/adc/ltc249*
Re: [PATCH 1/3] dt-bindings: iio: adc: Add docs for LTC2499
Posted by Jonathan Cameron 3 years, 7 months ago
On Mon, 22 Aug 2022 20:24:35 +0100
Jonathan Cameron <jic23@kernel.org> wrote:

> On Mon, 22 Aug 2022 15:51:04 +0300
> Ciprian Regus <ciprian.regus@analog.com> wrote:
> 
> > Update the bindings documentation for ltc2497 to include the ltc2499.
> > 
> > Signed-off-by: Ciprian Regus <ciprian.regus@analog.com>  
> Looks fine to me.  Maybe a separate patch to add the ltc2496 binding
> given the driver is included in this MAINTAINERS entry?
> A random comment inline.
> 
> Jonathan
> 
> > ---
> >  Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml | 6 +++++-
> >  MAINTAINERS                                                 | 1 +
> >  2 files changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml
> > index c1772b568cd1..7bb30eafc543 100644
> > --- a/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml
> > +++ b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml
> > @@ -13,10 +13,14 @@ description: |
> >    16bit ADC supporting up to 16 single ended or 8 differential inputs.
> >    I2C interface.
> >  
> > +  https://www.analog.com/media/en/technical-documentation/data-sheets/2497fb.pdf
> > +  https://www.analog.com/media/en/technical-documentation/data-sheets/2499fe.pdf
> > +
> >  properties:
> >    compatible:
> > -    const:
> > +    enum:
> >        lltc,ltc2497
> > +      lltc,ltc2499

Oops. Benefit of Rob's build bot later.

       enum:
         - lltc,ltc2497
         - lltc,ltc2499

Just goes to show how wonderful automatic checking is :)

Jonathan

> >  
> >    reg: true
> >    vref-supply: true
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index 9d7f64dc0efe..3c847619ceb1 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -1327,6 +1327,7 @@ W:	https://ez.analog.com/linux-software-drivers
> >  F:	Documentation/ABI/testing/sysfs-bus-iio-frequency-ad9523
> >  F:	Documentation/ABI/testing/sysfs-bus-iio-frequency-adf4350
> >  F:	Documentation/devicetree/bindings/iio/*/adi,*
> > +F:	Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml
> >  F:	Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml  
> 
> Unrelated question, but why is this here given the wild cards above match?
> 
> >  F:	drivers/iio/*/ad*
> >  F:	drivers/iio/adc/ltc249*
Re: [PATCH 1/3] dt-bindings: iio: adc: Add docs for LTC2499
Posted by Rob Herring 3 years, 7 months ago
On Mon, 22 Aug 2022 15:51:04 +0300, Ciprian Regus wrote:
> Update the bindings documentation for ltc2497 to include the ltc2499.
> 
> Signed-off-by: Ciprian Regus <ciprian.regus@analog.com>
> ---
>  Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml | 6 +++++-
>  MAINTAINERS                                                 | 1 +
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml: properties:compatible:enum: 'lltc,ltc2497 lltc,ltc2499' is not of type 'array'
	from schema $id: http://json-schema.org/draft-07/schema#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml: properties:compatible:enum: 'lltc,ltc2497 lltc,ltc2499' is not of type 'array'
	from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml: properties:compatible:enum: 'lltc,ltc2497 lltc,ltc2499' is not of type 'array'
	from schema $id: http://devicetree.org/meta-schemas/string-array.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml: ignoring, error in schema: properties: compatible: enum
Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.example.dtb:0:0: /example-0/i2c/adc@76: failed to match any schema with compatible: ['lltc,ltc2497']

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.