diff mbox series

[05/10] dt-bindings: iio: adc: mcp3911: add microchip,data-ready-hiz entry

Message ID 20220623170844.2189814-5-marcus.folkesson@gmail.com (mailing list archive)
State Changes Requested
Headers show
Series [01/10] iio: adc: mcp3911: correct "microchip,device-addr" property | expand

Commit Message

Marcus Folkesson June 23, 2022, 5:08 p.m. UTC
The Data Ready Output Pin is either hard wired to work as high
impedance or push-pull. Make it configurable.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 .../devicetree/bindings/iio/adc/microchip,mcp3911.yaml    | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Krzysztof Kozlowski June 24, 2022, 9:54 a.m. UTC | #1
On 23/06/2022 19:08, Marcus Folkesson wrote:
> The Data Ready Output Pin is either hard wired to work as high
> impedance or push-pull. Make it configurable.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> ---
>  .../devicetree/bindings/iio/adc/microchip,mcp3911.yaml    | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml b/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml
> index 95ab285f4eba..74b333e44bfd 100644
> --- a/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml
> @@ -36,6 +36,14 @@ properties:
>      description: IRQ line of the ADC
>      maxItems: 1
>  
> +  microchip,data-ready-hiz:
> +    description:
> +      Data Ready Pin Inactive State Control bit

"Bit" of what? Do not describe the programming model but the actual feature.

> +      true = The DR pin state is high-impedance when data are NOT ready
> +      false = The DR pin state is a logic high when data are NOT ready
> +    type: boolean
> +    default: false

You do not need default for bools.

> +
>    microchip,device-addr:
>      description: Device address when multiple MCP3911 chips are present on the same SPI bus.
>      $ref: /schemas/types.yaml#/definitions/uint32


Best regards,
Krzysztof
Marcus Folkesson June 24, 2022, 12:10 p.m. UTC | #2
On Fri, Jun 24, 2022 at 11:54:58AM +0200, Krzysztof Kozlowski wrote:
> > +  microchip,data-ready-hiz:
> > +    description:
> > +      Data Ready Pin Inactive State Control bit
> 
> "Bit" of what? Do not describe the programming model but the actual feature.
> 

You are right. I will remove "bit".

> > +      true = The DR pin state is high-impedance when data are NOT ready
> > +      false = The DR pin state is a logic high when data are NOT ready
> > +    type: boolean
> > +    default: false
> 
> You do not need default for bools.

OK
> 
> > +
> >    microchip,device-addr:
> >      description: Device address when multiple MCP3911 chips are present on the same SPI bus.
> >      $ref: /schemas/types.yaml#/definitions/uint32
> 
> 
> Best regards,
> Krzysztof

Thanks,
Marcus Folkesson
Rob Herring (Arm) June 24, 2022, 5:26 p.m. UTC | #3
On Thu, 23 Jun 2022 19:08:39 +0200, Marcus Folkesson wrote:
> The Data Ready Output Pin is either hard wired to work as high
> impedance or push-pull. Make it configurable.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> ---
>  .../devicetree/bindings/iio/adc/microchip,mcp3911.yaml    | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 

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/microchip,mcp3911.yaml: properties:microchip,data-ready-hiz: 'oneOf' conditional failed, one must be fixed:
	Additional properties are not allowed ('default' was unexpected)
		hint: A vendor boolean property can use "type: boolean"
	/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml: properties:microchip,data-ready-hiz: 'oneOf' conditional failed, one must be fixed:
		'enum' is a required property
		'const' is a required property
		hint: A vendor string property with exact values has an implicit type
		from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml#
	Additional properties are not allowed ('default', 'type' were unexpected)
		hint: A vendor string property with exact values has an implicit type
	/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml: properties:microchip,data-ready-hiz: 'oneOf' conditional failed, one must be fixed:
		'$ref' is a required property
		'allOf' is a required property
		hint: A vendor property needs a $ref to types.yaml
		from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml#
	hint: Vendor specific properties must have a type and description unless they have a defined, common suffix.
	from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml: ignoring, error in schema: properties: microchip,data-ready-hiz
Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.example.dtb:0:0: /example-0/spi/adc@0: failed to match any schema with compatible: ['microchip,mcp3911']

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.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml b/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml
index 95ab285f4eba..74b333e44bfd 100644
--- a/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml
@@ -36,6 +36,14 @@  properties:
     description: IRQ line of the ADC
     maxItems: 1
 
+  microchip,data-ready-hiz:
+    description:
+      Data Ready Pin Inactive State Control bit
+      true = The DR pin state is high-impedance when data are NOT ready
+      false = The DR pin state is a logic high when data are NOT ready
+    type: boolean
+    default: false
+
   microchip,device-addr:
     description: Device address when multiple MCP3911 chips are present on the same SPI bus.
     $ref: /schemas/types.yaml#/definitions/uint32