Re: [PATCH v2 2/2] dt-bindings: hwmon: pwm-fan: add retain-state-shutdown property
From: Krzysztof Kozlowski
Date: Mon Oct 28 2024 - 10:23:58 EST
On 28/10/2024 13:42, Akinobu Mita wrote:
> 2024年10月28日(月) 5:38 Krzysztof Kozlowski <krzk@xxxxxxxxxx>:
>>
>> On Sat, Oct 26, 2024 at 05:05:35PM +0900, Akinobu Mita wrote:
>>> Document new retain-state-shutdown property.
>>>
>>> Cc: Jean Delvare <jdelvare@xxxxxxxx>
>>> Cc: Guenter Roeck <linux@xxxxxxxxxxxx>
>>> Cc: Rob Herring <robh@xxxxxxxxxx>
>>> Cc: Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>
>>> Cc: Conor Dooley <conor+dt@xxxxxxxxxx>
>>> Cc: Billy Tsai <billy_tsai@xxxxxxxxxxxxxx>
>>> Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>
>>> ---
>>> Documentation/devicetree/bindings/hwmon/pwm-fan.yaml | 4 ++++
>>> 1 file changed, 4 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml b/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml
>>> index 4e5abf7580cc..86a069969e29 100644
>>> --- a/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml
>>> +++ b/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml
>>> @@ -40,6 +40,10 @@ properties:
>>> maximum: 4
>>> default: 2
>>>
>>> + retain-state-shutdown:
>>> + description: Retain the state of the PWM on shutdown.
>>
>> 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.
Best regards,
Krzysztof