From: Krzysztof Kozlowski <krzk@kernel.org>
To: Billy Tsai <billy_tsai@aspeedtech.com>,
Akinobu Mita <akinobu.mita@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Subject: Re: [PATCH v2 2/2] dt-bindings: hwmon: pwm-fan: add retain-state-shutdown property
Date: Mon, 4 Nov 2024 12:47:16 +0100 [thread overview]
Message-ID: <62e24ed4-3579-46ff-a77a-c5733125012c@kernel.org> (raw)
In-Reply-To: <OSQPR06MB72525057883A59578441E0988B512@OSQPR06MB7252.apcprd06.prod.outlook.com>
On 04/11/2024 08:45, Billy Tsai wrote:
>>>
>>> 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?
How is this binding applicable on system (e.g. on *BSD) which does not
disable PWM on reboot?
> 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.
Best regards,
Krzysztof
next prev parent reply other threads:[~2024-11-04 11:47 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-26 8:05 [PATCH v2 0/2] hwmon: (pwm-fan) add option to leave fan on shutdown Akinobu Mita
2024-10-26 8:05 ` [PATCH v2 1/2] " Akinobu Mita
2024-10-29 2:34 ` Billy Tsai
2024-10-30 14:55 ` Akinobu Mita
2024-10-30 15:02 ` Guenter Roeck
2024-10-30 15:18 ` Akinobu Mita
2024-10-30 15:30 ` Guenter Roeck
2024-10-26 8:05 ` [PATCH v2 2/2] dt-bindings: hwmon: pwm-fan: add retain-state-shutdown property Akinobu Mita
2024-10-27 20:38 ` Krzysztof Kozlowski
2024-10-28 12:42 ` Akinobu Mita
2024-10-28 14:22 ` Krzysztof Kozlowski
2024-10-28 14:57 ` Akinobu Mita
2024-10-30 15:18 ` Krzysztof Kozlowski
2024-10-30 15:34 ` Akinobu Mita
2024-11-04 7:45 ` Billy Tsai
2024-11-04 11:47 ` Krzysztof Kozlowski [this message]
2024-11-05 8:16 ` Billy Tsai
2024-10-26 16:19 ` [PATCH v2 0/2] hwmon: (pwm-fan) add option to leave fan on shutdown Guenter Roeck
2024-10-27 5:31 ` Akinobu Mita
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=62e24ed4-3579-46ff-a77a-c5733125012c@kernel.org \
--to=krzk@kernel.org \
--cc=akinobu.mita@gmail.com \
--cc=billy_tsai@aspeedtech.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jdelvare@suse.com \
--cc=krzk+dt@kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox