[v2,2/2] dt-bindings: iio: adc: ad7923: adjust documentation

Message ID 20221120124543.18973-1-edmund.berenson@emlix.com
State New
Headers
Series [v2,1/2] iio: adc: ad7923: Add ad7927 |

Commit Message

Edmund Berenson Nov. 20, 2022, 12:45 p.m. UTC
  - Add the ad7927 compatibility string, with fallback compatibility
to ad7928.
- ad7923 and ad7924 are treated the same in the driver, show
the relationship in the documentation.

Suggested-by: Lukasz Zemla <Lukasz.Zemla@woodward.com>
Signed-off-by: Edmund Berenson <edmund.berenson@emlix.com>
---
 .../bindings/iio/adc/adi,ad7923.yaml          | 21 +++++++++++--------
 1 file changed, 12 insertions(+), 9 deletions(-)
  

Comments

Rob Herring Nov. 20, 2022, 3:09 p.m. UTC | #1
On Sun, 20 Nov 2022 13:45:43 +0100, Edmund Berenson wrote:
> - Add the ad7927 compatibility string, with fallback compatibility
> to ad7928.
> - ad7923 and ad7924 are treated the same in the driver, show
> the relationship in the documentation.
> 
> Suggested-by: Lukasz Zemla <Lukasz.Zemla@woodward.com>
> Signed-off-by: Edmund Berenson <edmund.berenson@emlix.com>
> ---
>  .../bindings/iio/adc/adi,ad7923.yaml          | 21 +++++++++++--------
>  1 file changed, 12 insertions(+), 9 deletions(-)
> 

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:
./Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml:27:9: [warning] wrong indentation: expected 10 but found 8 (indentation)
./Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml:32:9: [warning] wrong indentation: expected 10 but found 8 (indentation)

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/iio/adc/adi,ad7923.example.dtb: adc@0: compatible: 'oneOf' conditional failed, one must be fixed:
	['adi,ad7928'] is too short
	'adi,ad7904' was expected
	'adi,ad7914' was expected
	'adi,ad7923' was expected
	'adi,ad7908' was expected
	'adi,ad7918' was expected
	'adi,ad7927' was expected
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/iio/adc/adi,ad7923.example.dtb: adc@0: Unevaluated properties are not allowed ('compatible' was unexpected)
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20221120124543.18973-1-edmund.berenson@emlix.com

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 after running the above command.
  
Rob Herring Nov. 20, 2022, 3:34 p.m. UTC | #2
On Sun, Nov 20, 2022 at 01:45:43PM +0100, Edmund Berenson wrote:
> - Add the ad7927 compatibility string, with fallback compatibility
> to ad7928.
> - ad7923 and ad7924 are treated the same in the driver, show
> the relationship in the documentation.
> 
> Suggested-by: Lukasz Zemla <Lukasz.Zemla@woodward.com>
> Signed-off-by: Edmund Berenson <edmund.berenson@emlix.com>
> ---
>  .../bindings/iio/adc/adi,ad7923.yaml          | 21 +++++++++++--------
>  1 file changed, 12 insertions(+), 9 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
> index 07f9d1c09c7d..165c4b6863e0 100644
> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
> @@ -11,7 +11,7 @@ maintainers:
>  
>  description: |
>    Analog Devices AD7904, AD7914, AD7923, AD7924 4 Channel ADCs, and AD7908,
> -   AD7918, AD7928 8 Channels ADCs.
> +   AD7918, AD7927, AD7928 8 Channels ADCs.
>  
>    Specifications about the part can be found at:
>      https://www.analog.com/media/en/technical-documentation/data-sheets/AD7923.pdf
> @@ -20,14 +20,17 @@ description: |
>  
>  properties:
>    compatible:
> -    enum:
> -      - adi,ad7904
> -      - adi,ad7914
> -      - adi,ad7923
> -      - adi,ad7924
> -      - adi,ad7908
> -      - adi,ad7918
> -      - adi,ad7928
> +    oneOf:
> +      - const: adi,ad7904
> +      - const: adi,ad7914
> +      - items:
> +        - const: adi,ad7923
> +        - const: adi,ad7924
> +      - const: adi,ad7908
> +      - const: adi,ad7918

All the single entry 'const' cases can remain an 'enum'.

> +      - items:
> +        - const: adi,ad7927
> +        - const: adi,ad7928
>  
>    reg:
>      maxItems: 1
> -- 
> 2.37.4
> 
>
  

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
index 07f9d1c09c7d..165c4b6863e0 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
@@ -11,7 +11,7 @@  maintainers:
 
 description: |
   Analog Devices AD7904, AD7914, AD7923, AD7924 4 Channel ADCs, and AD7908,
-   AD7918, AD7928 8 Channels ADCs.
+   AD7918, AD7927, AD7928 8 Channels ADCs.
 
   Specifications about the part can be found at:
     https://www.analog.com/media/en/technical-documentation/data-sheets/AD7923.pdf
@@ -20,14 +20,17 @@  description: |
 
 properties:
   compatible:
-    enum:
-      - adi,ad7904
-      - adi,ad7914
-      - adi,ad7923
-      - adi,ad7924
-      - adi,ad7908
-      - adi,ad7918
-      - adi,ad7928
+    oneOf:
+      - const: adi,ad7904
+      - const: adi,ad7914
+      - items:
+        - const: adi,ad7923
+        - const: adi,ad7924
+      - const: adi,ad7908
+      - const: adi,ad7918
+      - items:
+        - const: adi,ad7927
+        - const: adi,ad7928
 
   reg:
     maxItems: 1