diff mbox series

[1/2] spi: dt-bindings: spi-peripheral-props: Document spi-cpha and spi-cpol

Message ID 20240829201315.3412759-1-festevam@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/2] spi: dt-bindings: spi-peripheral-props: Document spi-cpha and spi-cpol | expand

Commit Message

Fabio Estevam Aug. 29, 2024, 8:13 p.m. UTC
The 'spi-cpha' and 'spi-cpol' are commonly used SPI peripheral
properties that indicate the device clock phase and polarity.

Document these properties.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 .../devicetree/bindings/spi/spi-peripheral-props.yaml  | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Conor Dooley Aug. 30, 2024, 2:11 p.m. UTC | #1
On Thu, Aug 29, 2024 at 05:13:14PM -0300, Fabio Estevam wrote:
> The 'spi-cpha' and 'spi-cpol' are commonly used SPI peripheral
> properties that indicate the device clock phase and polarity.
> 
> Document these properties.
> 
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
>  .../devicetree/bindings/spi/spi-peripheral-props.yaml  | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
> index 0bb443b8decd..b2e2717f3619 100644
> --- a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
> +++ b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
> @@ -29,6 +29,16 @@ properties:
>      description:
>        Chip select used by the device.
>  
> +  spi-cpha:
> +    $ref: /schemas/types.yaml#/definitions/flag
> +    description:
> +      The device data is sampled on trailing (last) edge of the SPI clock.
> +
> +  spi-cpol:
> +    $ref: /schemas/types.yaml#/definitions/flag
> +    description:
> +      The device clock has a falling lead (first) edge.

These two should just be usable with "spi-cpha: true", they're applied
by the controller schema to it's child nodes, so you don't need to
redefine their type here.

> +
>    spi-cs-high:
>      $ref: /schemas/types.yaml#/definitions/flag
>      description:
> -- 
> 2.34.1
>
Krzysztof Kozlowski Aug. 31, 2024, 6:26 a.m. UTC | #2
On 29/08/2024 22:13, Fabio Estevam wrote:
> The 'spi-cpha' and 'spi-cpol' are commonly used SPI peripheral
> properties that indicate the device clock phase and polarity.
> 
> Document these properties.
> 
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
>  .../devicetree/bindings/spi/spi-peripheral-props.yaml  | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
> index 0bb443b8decd..b2e2717f3619 100644
> --- a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
> +++ b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
> @@ -29,6 +29,16 @@ properties:
>      description:
>        Chip select used by the device.
>  
> +  spi-cpha:
> +    $ref: /schemas/types.yaml#/definitions/flag
> +    description:
> +      The device data is sampled on trailing (last) edge of the SPI clock.
> +
> +  spi-cpol:
> +    $ref: /schemas/types.yaml#/definitions/flag
> +    description:
> +      The device clock has a falling lead (first) edge.

That would be a revert of earlier commit without explanation why such
revert is needed. :(

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
index 0bb443b8decd..b2e2717f3619 100644
--- a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
+++ b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
@@ -29,6 +29,16 @@  properties:
     description:
       Chip select used by the device.
 
+  spi-cpha:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      The device data is sampled on trailing (last) edge of the SPI clock.
+
+  spi-cpol:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      The device clock has a falling lead (first) edge.
+
   spi-cs-high:
     $ref: /schemas/types.yaml#/definitions/flag
     description: