Re: [PATCH v3 2/2] pwm: Add support for pwm nexus dt bindings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx> 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@xxxxxxxxxx> 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

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux