Re: [PATCH v2] dt-bindings: pwm: Convert lpc32xx-pwm.txt to YAML
From: Uwe Kleine-König
Date: Thu Mar 13 2025 - 03:24:44 EST
Hello Vladimir,
On Thu, Mar 13, 2025 at 05:37:44AM +0200, Vladimir Zapolskiy wrote:
> On 3/13/25 00:56, Uwe Kleine-König wrote:
> > Hello,
> >
> > On Wed, Mar 12, 2025 at 07:59:21PM +0200, Vladimir Zapolskiy wrote:
> > > > + "#pwm-cells":
> > > > + const: 3
> > >
> > > It shall be 1.
> >
> > No, 3 is the right choice.
> >
>
> could you please elaborate?
>
> I find that here the only configurable parameter is PWM period, so it
> should be sufficient to have one cell only like in marvell,pxa-pwm.yaml
> or google,cros-ec-pwm.yaml.
These two bindings are special snow-flakes and the only drivers that
have #pwm-cells = <1>. Most other bindings use 3 and since commit
895fe4537cc8 ("pwm: Add upgrade path to #pwm-cells = <3> for users of
of_pwm_single_xlate()") (which was created for the pxa driver) the pxa
driver also supports 3 cells. The cros-ec driver even has comment about
that being ugly.
I intend to convert all bindings to use 3 soon.
While that isn't necessary for each individual piece of hardware to
provide 3 values, having a uniform binding for PWMs provides a nice user
experience and also simplifies matters with nexus nodes (see
e71e46a6f19c ("pwm: Add support for pwm nexus dt bindings")).
Best regards
Uwe
Attachment:
signature.asc
Description: PGP signature