diff mbox series

[v2,1/3] dt-bindings: pwm: imx-pwm: Unify #pwm-cells for all compatibles

Message ID 20231106151326.812099-2-alexander.stein@ew.tq-group.com (mailing list archive)
State New, archived
Headers show
Series imx8qm/imx8qxp: Support for inverted PWM | expand

Commit Message

Alexander Stein Nov. 6, 2023, 3:13 p.m. UTC
Use #pwm-cells for all i.MX variants. Only fsl,imx1-pwm does not support
inverted PWM output. Keep it the same for consistency.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
 Documentation/devicetree/bindings/pwm/imx-pwm.yaml | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

Comments

Uwe Kleine-König Nov. 6, 2023, 3:39 p.m. UTC | #1
On Mon, Nov 06, 2023 at 04:13:24PM +0100, Alexander Stein wrote:
> Use #pwm-cells for all i.MX variants. Only fsl,imx1-pwm does not support
> inverted PWM output. Keep it the same for consistency.
> 
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
>  Documentation/devicetree/bindings/pwm/imx-pwm.yaml | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/pwm/imx-pwm.yaml b/Documentation/devicetree/bindings/pwm/imx-pwm.yaml
> index c01dff3b7f843..a84a240a61dc1 100644
> --- a/Documentation/devicetree/bindings/pwm/imx-pwm.yaml
> +++ b/Documentation/devicetree/bindings/pwm/imx-pwm.yaml
> @@ -14,12 +14,10 @@ allOf:
>  
>  properties:
>    "#pwm-cells":
> -    description: |
> -      Should be 2 for i.MX1 and 3 for i.MX27 and newer SoCs. See pwm.yaml
> -      in this directory for a description of the cells format.
> -    enum:
> -      - 2
> -      - 3
> +    description:
> +      The only third cell flag supported by this binding is
> +      PWM_POLARITY_INVERTED. fsl,imx1-pwm does not support this flags.
> +    const: 3

You dropped the | from the description line, but with my understanding
of yaml this should be fine.

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

Thanks
Uwe
Conor Dooley Nov. 8, 2023, 12:37 p.m. UTC | #2
On Mon, Nov 06, 2023 at 04:39:26PM +0100, Uwe Kleine-König wrote:
> On Mon, Nov 06, 2023 at 04:13:24PM +0100, Alexander Stein wrote:
> > Use #pwm-cells for all i.MX variants. Only fsl,imx1-pwm does not support
> > inverted PWM output. Keep it the same for consistency.
> > 
> > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> > ---
> >  Documentation/devicetree/bindings/pwm/imx-pwm.yaml | 10 ++++------
> >  1 file changed, 4 insertions(+), 6 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/pwm/imx-pwm.yaml b/Documentation/devicetree/bindings/pwm/imx-pwm.yaml
> > index c01dff3b7f843..a84a240a61dc1 100644
> > --- a/Documentation/devicetree/bindings/pwm/imx-pwm.yaml
> > +++ b/Documentation/devicetree/bindings/pwm/imx-pwm.yaml
> > @@ -14,12 +14,10 @@ allOf:
> >  
> >  properties:
> >    "#pwm-cells":
> > -    description: |
> > -      Should be 2 for i.MX1 and 3 for i.MX27 and newer SoCs. See pwm.yaml
> > -      in this directory for a description of the cells format.
> > -    enum:
> > -      - 2
> > -      - 3
> > +    description:
> > +      The only third cell flag supported by this binding is
> > +      PWM_POLARITY_INVERTED. fsl,imx1-pwm does not support this flags.
> > +    const: 3
> 
> You dropped the | from the description line, but with my understanding
> of yaml this should be fine.

Ya, it was not required there in the first place.

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

Cheers,
Conor.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pwm/imx-pwm.yaml b/Documentation/devicetree/bindings/pwm/imx-pwm.yaml
index c01dff3b7f843..a84a240a61dc1 100644
--- a/Documentation/devicetree/bindings/pwm/imx-pwm.yaml
+++ b/Documentation/devicetree/bindings/pwm/imx-pwm.yaml
@@ -14,12 +14,10 @@  allOf:
 
 properties:
   "#pwm-cells":
-    description: |
-      Should be 2 for i.MX1 and 3 for i.MX27 and newer SoCs. See pwm.yaml
-      in this directory for a description of the cells format.
-    enum:
-      - 2
-      - 3
+    description:
+      The only third cell flag supported by this binding is
+      PWM_POLARITY_INVERTED. fsl,imx1-pwm does not support this flags.
+    const: 3
 
   compatible:
     oneOf: