Message ID | 20230921184348.290261-3-festevam@gmail.com |
---|---|
State | Not Applicable |
Headers | show |
Series | [1/3] dt-bindings: pwm: mxs: Document fsl,imx28-pwm | expand |
Context | Check | Description |
---|---|---|
robh/checkpatch | success | |
robh/patch-applied | success | |
robh/dtbs-check | warning | build log |
robh/dt-meta-schema | success |
Hello Fabio, On Thu, Sep 21, 2023 at 03:43:48PM -0300, Fabio Estevam wrote: > From: Fabio Estevam <festevam@denx.de> > > All the in-tree imx23 and imx28 devicetrees use #pwm-cells = <2>. > > Allow it in the schema to avoid warnings. > > It is still possible for a devicetree to pass the third cell with the > PWM polarity though. > > This is similar to imx-pwm.yaml that allows #pwm-cells to be 2 or 3. Alternatively switch all devicetrees to use = <3>? That's what I'd prefer given that the PWM supports both polarities. Best regards Uwe
On Thu, Sep 21, 2023 at 09:59:09PM +0200, Uwe Kleine-König wrote: > Hello Fabio, > > On Thu, Sep 21, 2023 at 03:43:48PM -0300, Fabio Estevam wrote: > > From: Fabio Estevam <festevam@denx.de> > > > > All the in-tree imx23 and imx28 devicetrees use #pwm-cells = <2>. > > > > Allow it in the schema to avoid warnings. > > > > It is still possible for a devicetree to pass the third cell with the > > PWM polarity though. > > > > This is similar to imx-pwm.yaml that allows #pwm-cells to be 2 or 3. > > Alternatively switch all devicetrees to use = <3>? That's what I'd > prefer given that the PWM supports both polarities. Technically, that could break older clients predating 3 cell support. But maybe that's far back enough now to not care. Either way, Acked-by: Rob Herring <robh@kernel.org>
diff --git a/Documentation/devicetree/bindings/pwm/mxs-pwm.yaml b/Documentation/devicetree/bindings/pwm/mxs-pwm.yaml index 8f50e23ca8c9..405c6412dd5f 100644 --- a/Documentation/devicetree/bindings/pwm/mxs-pwm.yaml +++ b/Documentation/devicetree/bindings/pwm/mxs-pwm.yaml @@ -29,7 +29,9 @@ properties: maxItems: 1 "#pwm-cells": - const: 3 + enum: + - 2 + - 3 fsl,pwm-number: $ref: /schemas/types.yaml#/definitions/uint32