[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2qnscxa3rzhnsslwzdms43m336l47qutk6ohfqny44lwofjiwh@r6cfdextnhwn>
Date: Wed, 5 Feb 2025 19:09:32 +0100
From: Uwe Kleine-König <ukleinek@...nel.org>
To: Herve Codina <herve.codina@...tlin.com>
Cc: Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, linux-pwm@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Luca Ceresoli <luca.ceresoli@...tlin.com>, Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH v3 2/2] pwm: Add support for pwm nexus dt bindings
Hello Hervé,
On Wed, Feb 05, 2025 at 06:19:30PM +0100, Herve Codina wrote:
> On Wed, 5 Feb 2025 17:29:30 +0100
> Uwe Kleine-König <ukleinek@...nel.org> wrote:
>
> > On Wed, Feb 05, 2025 at 02:37:37PM +0100, Herve Codina wrote:
> > > On Wed, 5 Feb 2025 12:38:32 +0100
> > > Uwe Kleine-König <ukleinek@...nel.org> wrote:
> > > > Could I adapt the mapping that the effect is
> > > >
> > > > pwms = <&soc_pwm2 57000 0>
> > >
> > > In this one, I think you miss the PWM number
> > >
> > > If I read correctly this line you ask for the PWM 57000 from the soc_pwm2
> > > controller. This doesn't make sense :)
> >
> > Some pwm chip devices with only a single output line use this. The first
> > paramter is the default period (which is passed in the 2nd parameter
> > normally) and the 2nd paramter are flags (normally the 3rd parameter).
> > Back then the rationale was that for such hardware, the line index is
> > zero always anyhow, and so could better be skipped.
> >
> > Compare of_pwm_xlate_with_flags() to of_pwm_single_xlate(). pwm-pxa is
> > the single offender using the latter. Thinking about that, it's easy
> > enough to fix without breaking compatibility. I'll tackle that.
> >
> > So for a PWM on pxa `<&soc_pwm2 57000 0>` works fine.
>
> I see. In this case, a parameter shift during translation would be needed to
> skip the PWM line index in the translated arguments. This is not currently
> neither described in device-tree specicication [0] nor handled in the common
> code of_parse_phandle_with_args_map() in the kernel.
OK, that's what I expected.
> This use case can appear for resources other than PWMs and IMHO it should be
> nice to have it supported.
>
> I think this support should proposed out of this series adding support for
> PWM nexus nodes.
>
> Is it blocking for this current series ?
Not from my side. If I get an Ack from the dt guys, I'll merge it.
Thanks
Uwe
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists