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] [day] [month] [year] [list]
Message-ID: <dirkbdd5oeofjhy5pk6jiaixbuhmuq7axewhrd7bdghc3dp5x6@ok2uhywwz5ls>
Date: Fri, 30 May 2025 11:38:29 +0200
From: Uwe Kleine-König <ukleinek@...nel.org>
To: Chris Packham <Chris.Packham@...iedtelesis.co.nz>
Cc: "jdelvare@...e.com" <jdelvare@...e.com>, 
	"linux@...ck-us.net" <linux@...ck-us.net>, "robh@...nel.org" <robh@...nel.org>, 
	"krzk+dt@...nel.org" <krzk+dt@...nel.org>, "conor+dt@...nel.org" <conor+dt@...nel.org>, 
	"linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>, "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>, 
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "linux-pwm@...r.kernel.org" <linux-pwm@...r.kernel.org>
Subject: Re: [PATCH v7 1/3] dt-bindings: hwmon: Add adt7475 fan/pwm properties

Hello Chris,

On Wed, May 28, 2025 at 09:18:37PM +0000, Chris Packham wrote:
> On 28/05/2025 18:10, Uwe Kleine-König wrote:
> > If I understand correctly you need the default value for duty to
> > statically setup (or only initialize?) a fan, right?
> 
> Correct.
> 
> > I'm not sure I like
> > extending #pwm-cells for a default duty value. Thinking about that a
> > while I'd prefer a binding that looks more like the clock configuration
> > stuff because actually having the period and flags as part of the
> > reference to the PWM to be used is also a bit strange. So I imagine
> > something like:
> >
> > 	mypwm: pwm {
> > 		compatible = "...."
> > 		#pwm-cells = <1>;
> > 	};
> >
> > 	fan {
> > 		compatible = "pwm-fan";
> > 		pwms = <&mypwm 1>;
> > 		assigned-pwms = <&mypwm>;
> > 		assigned-pwm-default-period-lengths-ns = <40000>;
> > 		assigned-pwm-default-flags = <PWM_POLARITY_INVERTED>;
> > 	};
> >
> > Then specifying a period (or later a duty cycle length) would be
> > optional and could be provided iff the device needs that for operation.
> 
> The frequency and flags were already part of the standard #pwm-cells 
> which I think is why I was encouraged to use them.

Yeah, that part is fine. This might not be the long-term future, but
today that's the norm.

> I was also trying to get something that would work as an ACPI overlay
> which turned out to be really hard.

I don't know enough about ACPI to be helpful with this quest.

> > My mail was just me being frustrated about another special case that I'd
> > have to handle if I go into that direction. I should have been more
> > attentive to that development before it entered the mainline.
> 
> I'd be happy to deprecate the 4 cell thing and replace it with 3 cell + 
> vendor property for the default period if that helps.

I wonder how other similar devices determine the default duty cycle.
Isn't the norm to make the fan rotate at max speed and then when
userspace takes over it's speeded down?

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