Skip to content

Commit

Permalink
spi/panel: dt-bindings: drop CPHA and CPOL from common properties
Browse files Browse the repository at this point in the history
The spi-cpha and spi-cpol properties are device specific and should be
accepted only if device really needs them.  Drop them from common
spi-peripheral-props.yaml schema, mention in few panel drivers which use
them and include instead in the SPI controller bindings.  The controller
bindings will provide CPHA/CPOL type validation and one place for
description.  Each device schema must list the properties if they are
applicable.

Suggested-by: Jonathan Cameron <jic23@kernel.org>
Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220722191539.90641-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Krzysztof Kozlowski authored and Mark Brown committed Jul 26, 2022
1 parent 89fcdd5 commit 233363a
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ properties:
enable-gpios: true
port: true

spi-cpha: true
spi-cpol: true

required:
- compatible
- enable-gpios
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ properties:
panel-height-mm:
description: physical panel height [mm]

spi-cpha: true
spi-cpol: true

required:
- compatible
- reg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ properties:
backlight: true
port: true

spi-cpha: true
spi-cpol: true

required:
- compatible
- reg
Expand Down
3 changes: 3 additions & 0 deletions Documentation/devicetree/bindings/display/panel/tpo,td.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ properties:
backlight: true
port: true

spi-cpha: true
spi-cpol: true

required:
- compatible
- port
Expand Down
11 changes: 11 additions & 0 deletions Documentation/devicetree/bindings/spi/spi-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,17 @@ patternProperties:
type: object
$ref: spi-peripheral-props.yaml

properties:
spi-cpha:
$ref: /schemas/types.yaml#/definitions/flag
description:
The device requires shifted clock phase (CPHA) mode.

spi-cpol:
$ref: /schemas/types.yaml#/definitions/flag
description:
The device requires inverse clock polarity (CPOL) mode.

required:
- compatible
- reg
Expand Down
10 changes: 0 additions & 10 deletions Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ properties:
description:
The device requires 3-wire mode.

spi-cpha:
$ref: /schemas/types.yaml#/definitions/flag
description:
The device requires shifted clock phase (CPHA) mode.

spi-cpol:
$ref: /schemas/types.yaml#/definitions/flag
description:
The device requires inverse clock polarity (CPOL) mode.

spi-cs-high:
$ref: /schemas/types.yaml#/definitions/flag
description:
Expand Down

0 comments on commit 233363a

Please sign in to comment.