diff mbox series

[2/3] dt-bindings: pwm: mxs: Document the clocks property

Message ID 20230921184348.290261-2-festevam@gmail.com
State Superseded
Headers show
Series [1/3] dt-bindings: pwm: mxs: Document fsl,imx28-pwm | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

Fabio Estevam Sept. 21, 2023, 6:43 p.m. UTC
From: Fabio Estevam <festevam@denx.de>

The 'clocks' property is mandatory for the PWM to operate.

Document it.

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 Documentation/devicetree/bindings/pwm/mxs-pwm.yaml | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Uwe Kleine-König Sept. 21, 2023, 8:07 p.m. UTC | #1
Hello,

On Thu, Sep 21, 2023 at 03:43:47PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
> 
> The 'clocks' property is mandatory for the PWM to operate.
> 
> Document it.

Indeed the driver does:

        mxs->clk = devm_clk_get(&pdev->dev, NULL);
        if (IS_ERR(mxs->clk))
                return PTR_ERR(mxs->clk);

so this is in line with the implementation.

Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Thanks
Uwe
Conor Dooley Sept. 22, 2023, 11:31 a.m. UTC | #2
On Thu, Sep 21, 2023 at 03:43:47PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
> 
> The 'clocks' property is mandatory for the PWM to operate.
> 
> Document it.

Acked-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

> 
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
>  Documentation/devicetree/bindings/pwm/mxs-pwm.yaml | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/pwm/mxs-pwm.yaml b/Documentation/devicetree/bindings/pwm/mxs-pwm.yaml
> index 655f008081d5..8f50e23ca8c9 100644
> --- a/Documentation/devicetree/bindings/pwm/mxs-pwm.yaml
> +++ b/Documentation/devicetree/bindings/pwm/mxs-pwm.yaml
> @@ -25,6 +25,9 @@ properties:
>    reg:
>      maxItems: 1
>  
> +  clocks:
> +    maxItems: 1
> +
>    "#pwm-cells":
>      const: 3
>  
> @@ -35,6 +38,7 @@ properties:
>  required:
>    - compatible
>    - reg
> +  - clocks
>    - fsl,pwm-number
>  
>  additionalProperties: false
> @@ -44,6 +48,7 @@ examples:
>      pwm@80064000 {
>          compatible = "fsl,imx23-pwm";
>          reg = <0x80064000 0x2000>;
> +        clocks = <&clks 30>;
>          #pwm-cells = <3>;
>          fsl,pwm-number = <8>;
>      };
> -- 
> 2.34.1
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pwm/mxs-pwm.yaml b/Documentation/devicetree/bindings/pwm/mxs-pwm.yaml
index 655f008081d5..8f50e23ca8c9 100644
--- a/Documentation/devicetree/bindings/pwm/mxs-pwm.yaml
+++ b/Documentation/devicetree/bindings/pwm/mxs-pwm.yaml
@@ -25,6 +25,9 @@  properties:
   reg:
     maxItems: 1
 
+  clocks:
+    maxItems: 1
+
   "#pwm-cells":
     const: 3
 
@@ -35,6 +38,7 @@  properties:
 required:
   - compatible
   - reg
+  - clocks
   - fsl,pwm-number
 
 additionalProperties: false
@@ -44,6 +48,7 @@  examples:
     pwm@80064000 {
         compatible = "fsl,imx23-pwm";
         reg = <0x80064000 0x2000>;
+        clocks = <&clks 30>;
         #pwm-cells = <3>;
         fsl,pwm-number = <8>;
     };