mbox series

[0/6] dt-bindings: iio/panel/eeprom/misc/net/spi: drop SPI CPHA and CPOL

Message ID 20220721153155.245336-1-krzysztof.kozlowski@linaro.org
Headers show
Series dt-bindings: iio/panel/eeprom/misc/net/spi: drop SPI CPHA and CPOL | expand

Message

Krzysztof Kozlowski July 21, 2022, 3:31 p.m. UTC
Hi,

Rebased on next-20220714

Merging
=======
1. The first five patches (panel, eeprom, iio, misc and net) are independent
   and could be taken as is.
2. The last SPI patch depends on all previous five, so:
   a. either everything goes through one tree (e.g. DT bindings),
   b. or SPI patch waits one cycle till dependencies get to rcX.

Preference is (2a) - everything through one tree because I plan to include
spi-peripheral-props.yaml in several SPI client bindings (continuation of [1]).

However IIO and SPI patch might not apply cleanly on DT bindings tree, as I
based it on linux-next. I can rebase if such merging is preferred.

Description
===========
The spi-cpha and spi-cpol properties are device specific and should be
accepted only if device really needs them.  Inspired by [1].

[1] https://lore.kernel.org/all/20220718220012.GA3625497-robh@kernel.org/

Best regards,
Krzysztof

Krzysztof Kozlowski (6):
  dt-bindings: panel: explicitly list SPI CPHA and CPOL
  dt-bindings: eeprom: at25: explicitly list SPI CPHA and CPOL
  dt-bindings: iio: explicitly list SPI CPHA and CPOL
  dt-bindings: misc: explicitly list SPI CPHA and CPOL
  dt-bindings: net: explicitly list SPI CPHA and CPOL
  spi: dt-bindings: drop CPHA and CPOL from common properties

 .../bindings/display/panel/lgphilips,lb035q02.yaml   | 10 ++++++++++
 .../bindings/display/panel/samsung,ld9040.yaml       | 10 ++++++++++
 .../bindings/display/panel/samsung,lms380kf01.yaml   | 12 +++++++++---
 .../bindings/display/panel/samsung,lms397kf04.yaml   | 12 +++++++++---
 .../bindings/display/panel/samsung,s6d27a1.yaml      | 12 +++++++++---
 .../bindings/display/panel/sitronix,st7789v.yaml     | 10 ++++++++++
 .../devicetree/bindings/display/panel/tpo,td.yaml    | 10 ++++++++++
 Documentation/devicetree/bindings/eeprom/at25.yaml   | 10 ++++++++--
 .../devicetree/bindings/iio/accel/adi,adxl345.yaml   | 10 ++++++++--
 .../devicetree/bindings/iio/adc/adi,ad7192.yaml      | 10 ++++++++--
 .../devicetree/bindings/iio/adc/adi,ad7292.yaml      |  5 ++++-
 .../devicetree/bindings/iio/adc/adi,ad7606.yaml      | 10 ++++++++--
 .../devicetree/bindings/iio/adc/adi,ad7768-1.yaml    | 10 ++++++++--
 .../bindings/iio/adc/microchip,mcp3201.yaml          | 12 ++++++++++--
 .../devicetree/bindings/iio/adc/ti,adc084s021.yaml   | 11 +++++++++--
 .../devicetree/bindings/iio/adc/ti,ads124s08.yaml    |  5 ++++-
 .../devicetree/bindings/iio/adc/ti,ads131e08.yaml    |  5 ++++-
 .../devicetree/bindings/iio/addac/adi,ad74413r.yaml  |  5 ++++-
 .../devicetree/bindings/iio/dac/adi,ad5592r.yaml     |  5 ++++-
 .../devicetree/bindings/iio/dac/adi,ad5755.yaml      | 10 ++++++++--
 .../devicetree/bindings/iio/dac/adi,ad5758.yaml      |  6 +++++-
 .../devicetree/bindings/iio/dac/adi,ad5766.yaml      |  5 ++++-
 .../devicetree/bindings/iio/dac/ti,dac082s085.yaml   |  9 +++++++--
 .../bindings/iio/gyroscope/adi,adxrs290.yaml         | 10 ++++++++--
 .../devicetree/bindings/iio/imu/adi,adis16460.yaml   | 12 +++++++++---
 .../devicetree/bindings/iio/imu/adi,adis16475.yaml   | 10 ++++++++--
 .../devicetree/bindings/iio/imu/adi,adis16480.yaml   | 11 +++++++++--
 .../bindings/iio/imu/invensense,icm42600.yaml        | 12 ++++++++++--
 .../bindings/iio/proximity/ams,as3935.yaml           |  5 ++++-
 .../devicetree/bindings/iio/resolver/adi,ad2s90.yaml | 10 ++++++++--
 .../bindings/iio/temperature/maxim,max31855k.yaml    |  6 +++++-
 .../bindings/iio/temperature/maxim,max31856.yaml     |  6 +++++-
 .../bindings/iio/temperature/maxim,max31865.yaml     |  6 +++++-
 .../devicetree/bindings/misc/olpc,xo1.75-ec.yaml     |  5 ++++-
 .../devicetree/bindings/net/nfc/marvell,nci.yaml     | 12 ++++++++++--
 .../devicetree/bindings/net/vertexcom-mse102x.yaml   | 12 +++++++++---
 .../bindings/spi/spi-peripheral-props.yaml           | 10 ----------
 37 files changed, 264 insertions(+), 67 deletions(-)

Comments

Rob Herring July 21, 2022, 7:30 p.m. UTC | #1
On Thu, Jul 21, 2022 at 05:31:50PM +0200, Krzysztof Kozlowski wrote:
> The spi-cpha and spi-cpol properties are device specific and should be
> accepted only if device really needs them.  Explicitly list them in
> device bindings in preparation of their removal from generic
> spi-peripheral-props.yaml schema.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../bindings/display/panel/lgphilips,lb035q02.yaml   | 10 ++++++++++
>  .../bindings/display/panel/samsung,ld9040.yaml       | 10 ++++++++++
>  .../bindings/display/panel/samsung,lms380kf01.yaml   | 12 +++++++++---
>  .../bindings/display/panel/samsung,lms397kf04.yaml   | 12 +++++++++---
>  .../bindings/display/panel/samsung,s6d27a1.yaml      | 12 +++++++++---
>  .../bindings/display/panel/sitronix,st7789v.yaml     | 10 ++++++++++
>  .../devicetree/bindings/display/panel/tpo,td.yaml    | 10 ++++++++++
>  7 files changed, 67 insertions(+), 9 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml b/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml
> index 5e4e0e552c2f..0bd7bbad5b94 100644
> --- a/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml
> @@ -21,6 +21,16 @@ properties:
>    enable-gpios: true
>    port: true
>  
> +  spi-cpha:
> +    type: boolean
> +    description:
> +      The device requires shifted clock phase (CPHA) mode.
> +
> +  spi-cpol:
> +    type: boolean
> +    description:
> +      The device requires inverse clock polarity (CPOL) mode.

Not great duplicating the type and description everywhere.

We can move the definition back to spi-controller.yaml, so then that 
does type checking of the property, but not presence/absence checks.

Rob
Rob Herring July 21, 2022, 7:32 p.m. UTC | #2
On Thu, Jul 21, 2022 at 05:31:52PM +0200, Krzysztof Kozlowski wrote:
> The spi-cpha and spi-cpol properties are device specific and should be
> accepted only if device really needs them.  Explicitly list them in
> device bindings in preparation of their removal from generic
> spi-peripheral-props.yaml schema.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../devicetree/bindings/iio/accel/adi,adxl345.yaml   | 10 ++++++++--
>  .../devicetree/bindings/iio/adc/adi,ad7192.yaml      | 10 ++++++++--
>  .../devicetree/bindings/iio/adc/adi,ad7292.yaml      |  5 ++++-
>  .../devicetree/bindings/iio/adc/adi,ad7606.yaml      | 10 ++++++++--
>  .../devicetree/bindings/iio/adc/adi,ad7768-1.yaml    | 10 ++++++++--
>  .../bindings/iio/adc/microchip,mcp3201.yaml          | 12 ++++++++++--
>  .../devicetree/bindings/iio/adc/ti,adc084s021.yaml   | 11 +++++++++--
>  .../devicetree/bindings/iio/adc/ti,ads124s08.yaml    |  5 ++++-
>  .../devicetree/bindings/iio/adc/ti,ads131e08.yaml    |  5 ++++-
>  .../devicetree/bindings/iio/addac/adi,ad74413r.yaml  |  5 ++++-
>  .../devicetree/bindings/iio/dac/adi,ad5592r.yaml     |  5 ++++-
>  .../devicetree/bindings/iio/dac/adi,ad5755.yaml      | 10 ++++++++--
>  .../devicetree/bindings/iio/dac/adi,ad5758.yaml      |  6 +++++-
>  .../devicetree/bindings/iio/dac/adi,ad5766.yaml      |  5 ++++-
>  .../devicetree/bindings/iio/dac/ti,dac082s085.yaml   |  9 +++++++--
>  .../bindings/iio/gyroscope/adi,adxrs290.yaml         | 10 ++++++++--
>  .../devicetree/bindings/iio/imu/adi,adis16460.yaml   | 12 +++++++++---
>  .../devicetree/bindings/iio/imu/adi,adis16475.yaml   | 10 ++++++++--
>  .../devicetree/bindings/iio/imu/adi,adis16480.yaml   | 11 +++++++++--
>  .../bindings/iio/imu/invensense,icm42600.yaml        | 12 ++++++++++--
>  .../bindings/iio/proximity/ams,as3935.yaml           |  5 ++++-
>  .../devicetree/bindings/iio/resolver/adi,ad2s90.yaml | 10 ++++++++--
>  .../bindings/iio/temperature/maxim,max31855k.yaml    |  6 +++++-
>  .../bindings/iio/temperature/maxim,max31856.yaml     |  6 +++++-
>  .../bindings/iio/temperature/maxim,max31865.yaml     |  6 +++++-
>  25 files changed, 166 insertions(+), 40 deletions(-)

This whole patch can be dropped which will make merging easier.

Rob
Rob Herring July 21, 2022, 7:35 p.m. UTC | #3
On Thu, Jul 21, 2022 at 05:31:54PM +0200, Krzysztof Kozlowski wrote:
> The spi-cpha and spi-cpol properties are device specific and should be
> accepted only if device really needs them.  Explicitly list them in
> device bindings in preparation of their removal from generic
> spi-peripheral-props.yaml schema.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../devicetree/bindings/net/nfc/marvell,nci.yaml     | 12 ++++++++++--
>  .../devicetree/bindings/net/vertexcom-mse102x.yaml   | 12 +++++++++---
>  2 files changed, 19 insertions(+), 5 deletions(-)

This too should not be needed.

Rob
Krzysztof Kozlowski July 22, 2022, 6:37 p.m. UTC | #4
On 21/07/2022 21:30, Rob Herring wrote:
> On Thu, Jul 21, 2022 at 05:31:50PM +0200, Krzysztof Kozlowski wrote:
>> The spi-cpha and spi-cpol properties are device specific and should be
>> accepted only if device really needs them.  Explicitly list them in
>> device bindings in preparation of their removal from generic
>> spi-peripheral-props.yaml schema.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>>  .../bindings/display/panel/lgphilips,lb035q02.yaml   | 10 ++++++++++
>>  .../bindings/display/panel/samsung,ld9040.yaml       | 10 ++++++++++
>>  .../bindings/display/panel/samsung,lms380kf01.yaml   | 12 +++++++++---
>>  .../bindings/display/panel/samsung,lms397kf04.yaml   | 12 +++++++++---
>>  .../bindings/display/panel/samsung,s6d27a1.yaml      | 12 +++++++++---
>>  .../bindings/display/panel/sitronix,st7789v.yaml     | 10 ++++++++++
>>  .../devicetree/bindings/display/panel/tpo,td.yaml    | 10 ++++++++++
>>  7 files changed, 67 insertions(+), 9 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml b/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml
>> index 5e4e0e552c2f..0bd7bbad5b94 100644
>> --- a/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml
>> +++ b/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.yaml
>> @@ -21,6 +21,16 @@ properties:
>>    enable-gpios: true
>>    port: true
>>  
>> +  spi-cpha:
>> +    type: boolean
>> +    description:
>> +      The device requires shifted clock phase (CPHA) mode.
>> +
>> +  spi-cpol:
>> +    type: boolean
>> +    description:
>> +      The device requires inverse clock polarity (CPOL) mode.
> 
> Not great duplicating the type and description everywhere.
> 
> We can move the definition back to spi-controller.yaml, so then that 
> does type checking of the property, but not presence/absence checks.

If I understand correctly, all client devices (which do no reference
spi-controller) will need to explicitly mention CPHA/CPOL. Good idea.

Best regards,
Krzysztof