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,

I really like this mechanism. Assuming the dt guys are happy yet, I
intend to merge it. Just some detail question below.

On Wed, Feb 05, 2025 at 10:55:43AM +0100, Herve Codina wrote:
> Nexus node support in PWM allows the following description:
> 	soc {
> 		soc_pwm1: pwm-controller1 {
> 			#pwm-cells = <3>;
> 		};
> 
> 		soc_pwm2: pwm-controller2 {
> 			#pwm-cells = <3>;
> 		};
> 	};
> 
> 	connector: connector {
> 		#pwm-cells = <3>;
> 		pwm-map = <0 0 0 &soc_pwm1 1 0 0>,
> 			  <1 0 0 &soc_pwm2 4 0 0>,
> 			  <2 0 0 &soc_pwm1 3 0 0>;
> 		pwm-map-mask = <0xffffffff 0x0 0x0>;
> 		pwm-map-pass-thru = <0x0 0xffffffff 0xffffffff>;
> 	};
> 
> 	expansion_device {
> 		pwms = <&connector 1 57000 0>;
> 	};

Does this also work if &soc_pwm2 has #pwm-cells = <2>? Would I need just

	pwm-map = <0 0 0 &soc_pwm1 1 0 0>,
		  <1 0 0 &soc_pwm2 4 0>,
		  <2 0 0 &soc_pwm1 3 0 0>;

then and

	pwms = <&connector 1 57000 0>;

would then have the same effect as

	pwms = <&soc_pwm2 4 57000>

and the 0 is dropped then? Could I adapt the mapping that the effect is

	pwms = <&soc_pwm2 57000 0>

instead?

This smells a bit ugly and I wonder if this gives a motivation to extend
the binding for PWMs that use #pwm-cells = <2> (or less) to also accept
the default 3-cell binding.

Best regards
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