2022-06-23 19:16:19

by Marcus Folkesson

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

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 <[email protected]>
---
.../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
+ 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
--
2.36.1


2022-06-24 09:59:02

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 05/10] dt-bindings: iio: adc: mcp3911: add microchip,data-ready-hiz entry

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 <[email protected]>
> ---
> .../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

2022-06-24 12:14:19

by Marcus Folkesson

[permalink] [raw]
Subject: Re: [PATCH 05/10] dt-bindings: iio: adc: mcp3911: add microchip,data-ready-hiz entry

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



Attachments:
(No filename) (830.00 B)
signature.asc (849.00 B)
Download all attachments

2022-06-24 17:47:58

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH 05/10] dt-bindings: iio: adc: mcp3911: add microchip,data-ready-hiz entry

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 <[email protected]>
> ---
> .../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.