Linux-Hwmon Archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Rob Herring <robh@kernel.org>, Peter Korsgaard <peter@korsgaard.com>
Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Subject: Re: [PATCH 1/2] dt-bindings: hwmon: pwm-fan: Document target-pwm property
Date: Wed, 24 Apr 2024 15:40:30 -0700	[thread overview]
Message-ID: <b717da30-1d4c-4e09-b98c-4aa41a235234@roeck-us.net> (raw)
In-Reply-To: <20240424220417.GA782554-robh@kernel.org>

On 4/24/24 15:04, Rob Herring wrote:
> On Wed, Apr 24, 2024 at 11:04:52AM +0200, Peter Korsgaard wrote:
>> Similar to target-rpm from fan-common.yaml but for the PWM setting
>> (0..255).
> 
> IIRC, we have a map of RPMs to PWM duty cycle, so why can't you
> use that plus target-rpm?
> 

target-rpm is the target fan speed. The property defined here
is the default pwm to set when the device is instantiated.

The two values are also orthogonal. The fan rpm is fan dependent.
Each fan will require a different pwm value to reach the target speed.
Trying to use target-rpm to set a default pwm value would really
not make much if any sense.

Guenter

> Anything new for existing fan bindings should ideally use what
> fan-common.yaml defined or be added to it.
> 
>>
>> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
>> ---
>>   Documentation/devicetree/bindings/hwmon/pwm-fan.yaml | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml b/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml
>> index 4e5abf7580cc..58513ff732af 100644
>> --- a/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml
>> +++ b/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml
>> @@ -46,6 +46,14 @@ properties:
>>   
>>     "#cooling-cells": true
>>   
>> +  target-pwm:
>> +    description:
>> +      The default desired fan PWM.
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    minimum: 0
>> +    maximum: 255
>> +    default: 255
>> +
>>   required:
>>     - compatible
>>     - pwms
>> -- 
>> 2.39.2
>>


      reply	other threads:[~2024-04-24 22:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-24  9:04 [PATCH 1/2] dt-bindings: hwmon: pwm-fan: Document target-pwm property Peter Korsgaard
2024-04-24  9:04 ` [PATCH 2/2] hwmon: (pwm-fan): support target-pwm property to set default PWM value Peter Korsgaard
2024-04-24 14:10   ` Guenter Roeck
2024-04-24 14:12   ` Guenter Roeck
2024-04-24 14:10 ` [PATCH 1/2] dt-bindings: hwmon: pwm-fan: Document target-pwm property Guenter Roeck
2024-04-24 20:24   ` Peter Korsgaard
2024-04-24 22:04 ` Rob Herring
2024-04-24 22:40   ` Guenter Roeck [this message]

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=b717da30-1d4c-4e09-b98c-4aa41a235234@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=peter@korsgaard.com \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).