Re: [PATCH 04/16] dt-bindings: fpga: machxo2-slave: add lattice,machxo2-slave-i2c compatible

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

 



On Thu, Aug 25, 2022 at 04:13:31PM +0200, Johannes Zink wrote:
> Lattice MachXO2 FPGAs allow reconfiguration over I2C as well as over
> SPI. Add the I2C option to the binding as well.
> 
> Signed-off-by: Johannes Zink <j.zink@xxxxxxxxxxxxxx>
> ---
>  .../bindings/fpga/lattice,machxo2-slave.yaml         | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/fpga/lattice,machxo2-slave.yaml b/Documentation/devicetree/bindings/fpga/lattice,machxo2-slave.yaml
> index 03dc134ec7b8..d48d92f27c92 100644
> --- a/Documentation/devicetree/bindings/fpga/lattice,machxo2-slave.yaml
> +++ b/Documentation/devicetree/bindings/fpga/lattice,machxo2-slave.yaml
> @@ -21,10 +21,22 @@ allOf:
>              const: lattice,machxo2-slave-spi
>      then:
>        $ref: /schemas/spi/spi-peripheral-props.yaml#

Okay, I guess you do need the if/then. Technically, you don't need it 
til this patch, but that's fine.

The allOf/if part should go after 'required' section though.

> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: lattice,machxo2-slave-i2c
> +    then:
> +      properties:
> +        reg:
> +          description: I2C address
> +          maxItems: 1

'reg' is needed in either case. The only conditional part is the 
description which you don't need. So this can be dropped.

> +
>  properties:
>    compatible:
>      enum:
>        - lattice,machxo2-slave-spi
> +      - lattice,machxo2-slave-i2c
>  
>    program-gpios:
>      maxItems: 1
> -- 
> 2.30.2
> 
> 



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux