Message ID | cb799d8a5bb284cd861785a691b8d5e329300d99.1738842938.git.u.kleine-koenig@baylibre.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | pwm: pxa: Use #pwm-cells = <3> | expand |
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@microchip.com> > Tested-by: Duje Mihanović <duje.mihanovic@skole.hr> > Reviewed-by: Daniel Mack <daniel@zonque.org> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@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
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 clocks: maxItems: 1 @@ -45,6 +44,6 @@ examples: pwm0: pwm@40b00000 { compatible = "marvell,pxa250-pwm"; reg = <0x40b00000 0x10>; - #pwm-cells = <1>; + #pwm-cells = <3>; clocks = <&clks CLK_PWM0>; };