Re: [PATCH v2 02/10] dt-bindings: iio: accel: use spi-peripheral-props.yaml

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

 



On Wed, 27 Jul 2022 18:46:38 +0200
Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> wrote:

> Instead of listing directly properties typical for SPI peripherals,
> reference the spi-peripheral-props.yaml schema.  This allows using all
> properties typical for SPI-connected devices, even these which device
> bindings author did not tried yet.
> 
> Remove the spi-* properties which now come via spi-peripheral-props.yaml
> schema, except for the cases when device schema adds some constraints
> like maximum frequency.
> 
> While changing additionalProperties->unevaluatedProperties, put it in
> typical place, just before example DTS.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
> 
> ---
> 
> I wonder if spi-3wire is device specific (not controller) and should be
> rather explicitly mentioned by device schema. Just like spi-cpol/cpha.

I think it is, but Mark is expert on this.
In general I'm waiting on Mark's opinion on the whole idea!

Thanks,

Jonathan

> ---
>  .../devicetree/bindings/iio/accel/adi,adis16201.yaml     | 7 ++++---
>  .../devicetree/bindings/iio/accel/adi,adis16240.yaml     | 7 ++++---
>  .../devicetree/bindings/iio/accel/adi,adxl313.yaml       | 9 ++++-----
>  .../devicetree/bindings/iio/accel/adi,adxl345.yaml       | 7 ++++---
>  .../devicetree/bindings/iio/accel/adi,adxl355.yaml       | 7 ++++---
>  .../devicetree/bindings/iio/accel/adi,adxl367.yaml       | 7 ++++---
>  .../devicetree/bindings/iio/accel/adi,adxl372.yaml       | 7 ++++---
>  .../devicetree/bindings/iio/accel/bosch,bma220.yaml      | 7 ++++---
>  .../devicetree/bindings/iio/accel/bosch,bma255.yaml      | 5 ++++-
>  .../devicetree/bindings/iio/accel/bosch,bmi088.yaml      | 7 ++++---
>  .../devicetree/bindings/iio/accel/fsl,mma7455.yaml       | 7 ++++---
>  .../devicetree/bindings/iio/accel/kionix,kxsd9.yaml      | 7 ++++---
>  .../devicetree/bindings/iio/accel/murata,sca3300.yaml    | 5 ++++-
>  .../devicetree/bindings/iio/accel/nxp,fxls8962af.yaml    | 7 ++++---
>  14 files changed, 56 insertions(+), 40 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adis16201.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adis16201.yaml
> index 6f8f8a6258fe..7332442e5661 100644
> --- a/Documentation/devicetree/bindings/iio/accel/adi,adis16201.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/adi,adis16201.yaml
> @@ -27,15 +27,16 @@ properties:
>    interrupts:
>      maxItems: 1
>  
> -  spi-max-frequency: true
> -
>    vdd-supply: true
>  
>  required:
>    - compatible
>    - reg
>  
> -additionalProperties: false
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml
> index 8d829ef878bc..f6f97164c2ca 100644
> --- a/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml
> @@ -25,14 +25,15 @@ properties:
>    interrupts:
>      maxItems: 1
>  
> -  spi-max-frequency: true
> -
>  required:
>    - compatible
>    - reg
>    - interrupts
>  
> -additionalProperties: false
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl313.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl313.yaml
> index d6afc1b8c272..7c1bc7810528 100644
> --- a/Documentation/devicetree/bindings/iio/accel/adi,adxl313.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl313.yaml
> @@ -22,10 +22,6 @@ properties:
>    reg:
>      maxItems: 1
>  
> -  spi-3wire: true
> -
> -  spi-max-frequency: true
> -
>    vs-supply:
>      description: Regulator that supplies power to the accelerometer
>  
> @@ -48,7 +44,10 @@ required:
>    - compatible
>    - reg
>  
> -additionalProperties: false
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> index 9bb039e2f533..346abfb13a3a 100644
> --- a/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> @@ -32,8 +32,6 @@ properties:
>  
>    spi-cpol: true
>  
> -  spi-max-frequency: true
> -
>    interrupts:
>      maxItems: 1
>  
> @@ -42,7 +40,10 @@ required:
>    - reg
>    - interrupts
>  
> -additionalProperties: false
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl355.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl355.yaml
> index ba54d6998f2e..14b487088ab4 100644
> --- a/Documentation/devicetree/bindings/iio/accel/adi,adxl355.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl355.yaml
> @@ -45,13 +45,14 @@ properties:
>    vddio-supply:
>      description: Regulator that provides power to the bus
>  
> -  spi-max-frequency: true
> -
>  required:
>    - compatible
>    - reg
>  
> -additionalProperties: false
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl367.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl367.yaml
> index d259e796c1d6..f10d98d34cb8 100644
> --- a/Documentation/devicetree/bindings/iio/accel/adi,adxl367.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl367.yaml
> @@ -35,8 +35,6 @@ properties:
>    interrupts:
>      maxItems: 1
>  
> -  spi-max-frequency: true
> -
>    vdd-supply: true
>    vddio-supply: true
>  
> @@ -45,7 +43,10 @@ required:
>    - reg
>    - interrupts
>  
> -additionalProperties: false
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml
> index 38b59b6454ce..73a5c8f814cc 100644
> --- a/Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml
> @@ -25,14 +25,15 @@ properties:
>    interrupts:
>      maxItems: 1
>  
> -  spi-max-frequency: true
> -
>  required:
>    - compatible
>    - reg
>    - interrupts
>  
> -additionalProperties: false
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml
> index 942b23ad0712..5dd06f5905b4 100644
> --- a/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml
> @@ -20,8 +20,6 @@ properties:
>    interrupts:
>      maxItems: 1
>  
> -  spi-max-frequency: true
> -
>    vdda-supply: true
>    vddd-supply: true
>    vddio-supply: true
> @@ -30,7 +28,10 @@ required:
>    - compatible
>    - reg
>  
> -additionalProperties: false
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml
> index 478e75ae0885..457a709b583c 100644
> --- a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml
> @@ -72,7 +72,10 @@ required:
>    - compatible
>    - reg
>  
> -additionalProperties: false
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml
> index 272eb48eef5a..3cb82576d758 100644
> --- a/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml
> @@ -24,8 +24,6 @@ properties:
>    reg:
>      maxItems: 1
>  
> -  spi-max-frequency: true
> -
>    vdd-supply: true
>  
>    vddio-supply: true
> @@ -50,7 +48,10 @@ required:
>    - compatible
>    - reg
>  
> -additionalProperties: false
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/fsl,mma7455.yaml b/Documentation/devicetree/bindings/iio/accel/fsl,mma7455.yaml
> index 7c8f8bdc2333..589ca8178f4a 100644
> --- a/Documentation/devicetree/bindings/iio/accel/fsl,mma7455.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/fsl,mma7455.yaml
> @@ -40,13 +40,14 @@ properties:
>          - "INT1"
>          - "INT2"
>  
> -  spi-max-frequency: true
> -
>  required:
>    - compatible
>    - reg
>  
> -additionalProperties: false
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/kionix,kxsd9.yaml b/Documentation/devicetree/bindings/iio/accel/kionix,kxsd9.yaml
> index 390b87242fcb..f64d99b35492 100644
> --- a/Documentation/devicetree/bindings/iio/accel/kionix,kxsd9.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/kionix,kxsd9.yaml
> @@ -29,13 +29,14 @@ properties:
>    mount-matrix:
>      description: an optional 3x3 mounting rotation matrix.
>  
> -  spi-max-frequency: true
> -
>  required:
>    - compatible
>    - reg
>  
> -additionalProperties: false
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/murata,sca3300.yaml b/Documentation/devicetree/bindings/iio/accel/murata,sca3300.yaml
> index f6e2a16a710b..00c990caa1e4 100644
> --- a/Documentation/devicetree/bindings/iio/accel/murata,sca3300.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/murata,sca3300.yaml
> @@ -29,7 +29,10 @@ required:
>    - compatible
>    - reg
>  
> -additionalProperties: false
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml b/Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml
> index ad529ab2c6e2..65ce8ea14b52 100644
> --- a/Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml
> @@ -27,8 +27,6 @@ properties:
>    vdd-supply:
>      description: phandle to the regulator that provides power to the accelerometer
>  
> -  spi-max-frequency: true
> -
>    interrupts:
>      maxItems: 1
>  
> @@ -44,7 +42,10 @@ required:
>    - compatible
>    - reg
>  
> -additionalProperties: false
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +unevaluatedProperties: false
>  
>  examples:
>    - |




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux