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:
 <OSQPR06MB725265027B4038A1CD3B51468B522@OSQPR06MB7252.apcprd06.prod.outlook.com>
Date: Tue, 5 Nov 2024 08:16:50 +0000
From: Billy Tsai <billy_tsai@...eedtech.com>
To: Krzysztof Kozlowski <krzk@...nel.org>, Akinobu Mita
	<akinobu.mita@...il.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>, Jean Delvare
	<jdelvare@...e.com>, Guenter Roeck <linux@...ck-us.net>, Rob Herring
	<robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
	<conor+dt@...nel.org>
Subject: Re: [PATCH v2 2/2] dt-bindings: hwmon: pwm-fan: add
 retain-state-shutdown property

> >>>
> >>> On 28/10/2024 15:57, Akinobu Mita wrote:
> >>>>>>>
> >>>>>>> You described the desired Linux feature or behavior, not the actual
> >>>>>>> hardware. The bindings are about the latter, so instead you need to
> >>>>>>> rephrase the property and its description to match actual hardware
> >>>>>>> capabilities/features/configuration etc.
> >>>>>>
> >>>>>> Is this description okay?
> >>>>>> (Reused the description of retain-state-shutdown in leds-gpio.yaml)
> >>>>>>
> >>>>>> description:
> >>>>>>   Retain the state of the PWM on shutdown. Useful in BMC systems, for
> >>>>>>   example, when the BMC is rebooted while the host remains up, the fan
> >>>>>>   will not stop.
> >>>>>
> >>>>> Nothing improved in the property. You still say what the system should
> >>>>> do. This is user-space choice, not DT.
> >>>>
> >>>> It seems better to implement it as a device attribute.
> >>>
> >>> I don't know about that. To repeat: if you say what system is supposed
> >>> to be doing, it is a policy. Describe the hardware and its configuration
> >>> and maybe this would be suitable for DT.
> >
> >> Billy, could you please write a proper description for this property?
> >> I'm not the right person for this.
> >
> > In our hardware, if the system reboots and power remains on the PWM controller
> > will retain its original settings. However, the pwm-fan.c driver currently disables
> > the PWM controller during a system reboot. I need this property to prevent pwm-fan.c

> If we change the PWM core not to disable it, then we have to change
> bindings?

If the pwm-fan.c driver doesn't disable the PWM controller, we don't need to add this property.

> How is this binding applicable on system (e.g. on *BSD) which does not
> disable PWM on reboot?

That's why we need this property?

> > from disabling the PWM when the system reboots.
> > In my point of view, the description can be:
> > Retain the state of the PWM on shutdown. Some platforms (e.g., BMC) will maintain
> > the PWM status after the system reboot. Add this property to prevent the PWM from being
> > disabled during the system reboot.

> You again describe what OS should do. First and last sentences are the same.

> Probably what you want to say is that fan is some critical component
> which should not be turned off or left unattended. Or that this hardware
> keeps last state of register on reset, so some boards might want to use
> it? If the first, then probably different property name. If the second,
> current seems fine, just choose some description describing actual hardware.

I think it will be the second one. Is it okay to change the description to the following?
Retain the state of the PWM on shutdown. Some platforms (e.g., BMC) require the PWM to maintain
its last register status on system reboot. Add this property to prevent the PWM from being disabled
during system reboot.

Thanks

Billy Tsai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ