lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ejdh76c4r44gxsdi7gwed65ste3wuunki2jgavc3wsfri5yaex@jccsywdfadgp>
Date: Wed, 5 Feb 2025 12:38: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,

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

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ