[PATCH v2 2/3] dt-bindings: pwm: marvell,pxa-pwm: Update to use #pwm-cells = <3>

Rob Herring robh at kernel.org
Tue Feb 11 08:16:15 PST 2025


On Thu, Feb 06, 2025 at 01:06:26PM +0100, Uwe Kleine-König wrote:
> The PXA PWM binding is the only one that doesn't pass the PWM line index
> as first parameter of the parameter cells. However this can be upgraded
> to the mandatory binding for all new PWM drivers without breaking
> compatibility for old device trees using #pwm-cells = <1>.
> 
> So bump #pwm-cells to 3 with the (undocumented) promise to keep the old
> behaviour for #pwm-cells = <1>.

Why make that undocumented?

> 
> Acked-by: Conor Dooley <conor.dooley at microchip.com>
> Tested-by: Duje Mihanović <duje.mihanovic at skole.hr>
> Reviewed-by: Daniel Mack <daniel at zonque.org>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig at baylibre.com>
> ---
>  Documentation/devicetree/bindings/pwm/marvell,pxa-pwm.yaml | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/pwm/marvell,pxa-pwm.yaml b/Documentation/devicetree/bindings/pwm/marvell,pxa-pwm.yaml
> index 9ee1946dc2e1..74f2d5964742 100644
> --- a/Documentation/devicetree/bindings/pwm/marvell,pxa-pwm.yaml
> +++ b/Documentation/devicetree/bindings/pwm/marvell,pxa-pwm.yaml
> @@ -25,8 +25,7 @@ properties:
>      maxItems: 1
>  
>    "#pwm-cells":
> -    # Used for specifying the period length in nanoseconds
> -    const: 1
> +    const: 3

Note that if we apply this and not the dts change, we'll add warnings.

You could instead do:

oneOf:
  - const: 1
    deprecated: true
  - const: 3




More information about the linux-arm-kernel mailing list