Re: [PATCH v2 02/10] dt-bindings: iio: adc: ad7606: Make corrections on spi conditions

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

 



On Fri, Sep 20, 2024 at 05:33:22PM +0000, Guillaume Stols wrote:
> The SPI conditions are not always required, because there is also a
> parallel interface. The way used to detect that the SPI interface is
> used is to check if the reg value is between 0 and 256.

And, yaknow, not that the bus you're on is a spi bus? I don't think this
comment is relevant to the binding, especially given you have a property
for it.

> There is also a correction on the spi-cpha that is not required when SPI
> interface is selected, while spi-cpol is.

I don't see this change in your patch, there's no cpha in the before.

> 
> Signed-off-by: Guillaume Stols <gstols@xxxxxxxxxxxx>
> ---
>  .../devicetree/bindings/iio/adc/adi,ad7606.yaml      | 20 +++++++++++++++++---
>  1 file changed, 17 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml
> index 75334a033539..12995ebcddc2 100644
> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml
> @@ -112,18 +112,32 @@ properties:
>        assumed that the pins are hardwired to VDD.
>      type: boolean
>  
> +  parallel-interface:
> +    description:
> +      If the parallel interface is used, be it directly or through a backend,
> +      this property must be defined.
> +    type: boolean

The type you would want here is actually "flag", but I'm not sure why a
property is needed. If you're using the parallel interface, why would
you still be on a spi bus? I think I'm a bit confused here as to how
this interface is supposed to be used.

Thanks,
Conor.

> +
>  required:
>    - compatible
>    - reg
> -  - spi-cpol
>    - avcc-supply
>    - vdrive-supply
>    - interrupts
>    - adi,conversion-start-gpios
>  
> -allOf:
> -  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +oneOf:
> +  - required:
> +      - parallel-interface
> +  - allOf:
> +      - properties:
> +          parallel-interface: false
> +          spi-cpol: true
> +      - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +      - required:
> +          - spi-cpol
>  
> +allOf:
>    - if:
>        properties:
>          compatible:
> 
> -- 
> 2.34.1
> 

Attachment: signature.asc
Description: PGP signature


[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