Linux-PWM Archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Rob Herring <robh@kernel.org>, Billy Tsai <billy_tsai@aspeedtech.com>
Cc: jdelvare@suse.com, krzysztof.kozlowski+dt@linaro.org,
	joel@jms.id.au, andrew@aj.id.au, corbet@lwn.net,
	thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de,
	p.zabel@pengutronix.de, naresh.solanki@9elements.com,
	linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-pwm@vger.kernel.org,
	BMC-SW@aspeedtech.com, patrick@stwcx.xyz
Subject: Re: [PATCH RESEND v10 1/3] dt-bindings: hwmon: fan: Add fan binding to schema
Date: Wed, 8 Nov 2023 10:38:27 -0800	[thread overview]
Message-ID: <d3204361-2d4c-41f9-8365-5826195aa884@roeck-us.net> (raw)
In-Reply-To: <20231108181654.GA2664986-robh@kernel.org>

On 11/8/23 10:16, Rob Herring wrote:
> On Tue, Nov 07, 2023 at 06:50:23PM +0800, Billy Tsai wrote:
>> From: Naresh Solanki <naresh.solanki@9elements.com>
>>
>> Add common fan properties bindings to a schema.
>>
>> Bindings for fan controllers can reference the common schema for the
>> fan
>>
>> child nodes:
>>
>>    patternProperties:
>>      "^fan@[0-2]":
>>        type: object
>>        $ref: fan-common.yaml#
>>        unevaluatedProperties: false
>>
>> Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
>> Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
>> ---
>>   .../devicetree/bindings/hwmon/fan-common.yaml | 78 +++++++++++++++++++
>>   1 file changed, 78 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/hwmon/fan-common.yaml
> 
> Looking pretty good to me. It's disappointing that no one else
> interested in upstreaming their fan controller can be bothered to
> comment.
> 

FWIW, I declined to comment since it basically looks ok to me
and because at this point I'd rather have something (whatever it is)
instead of nothing.

>>
>> diff --git a/Documentation/devicetree/bindings/hwmon/fan-common.yaml b/Documentation/devicetree/bindings/hwmon/fan-common.yaml
>> new file mode 100644
>> index 000000000000..be4ce3bd7f22
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/hwmon/fan-common.yaml
>> @@ -0,0 +1,78 @@
>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/hwmon/fan-common.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Common Fan Properties
>> +
>> +maintainers:
>> +  - Naresh Solanki <naresh.solanki@9elements.com>
>> +  - Billy Tsai <billy_tsai@aspeedtech.com>
>> +
>> +properties:
>> +  max-rpm:
>> +    description:
>> +      Max RPM supported by fan.
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    maximum: 100000
>> +
>> +  min-rpm:
>> +    description:
>> +      Min RPM supported by fan.
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    maximum: 1000
>> +
>> +  pulses-per-revolution:
>> +    description:
>> +      The number of pulse from fan sensor per revolution.
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    maximum: 4
>> +
>> +  tach-div:
>> +    description:
>> +      Divisor for the tach sampling clock, which determines the sensitivity of the tach pin.
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +
>> +  target-rpm:
>> +    description:
>> +      The default desired fan speed in RPM.
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +
>> +  fan-driving-mode:
>> +    description:
>> +      Select the driving mode of the fan.(DC, PWM and so on)
>> +    $ref: /schemas/types.yaml#/definitions/string
> 
> You need to define the possible values. I assume it's:
> 
> enum:
>    - dc
>    - pwm
>    - anything else???
> 

I am not aware of any other possible method. dc and pwm is all
I have ever seen.

Guenter

> With that,
> 
> Reviewed-by: Rob Herring <robh@kernel.org>


  reply	other threads:[~2023-11-08 18:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-07 10:50 [PATCH RESEND v10 0/3] Support pwm/tach driver for aspeed ast26xx Billy Tsai
2023-11-07 10:50 ` [PATCH RESEND v10 1/3] dt-bindings: hwmon: fan: Add fan binding to schema Billy Tsai
2023-11-08 18:16   ` Rob Herring
2023-11-08 18:38     ` Guenter Roeck [this message]
2023-11-07 10:50 ` [PATCH RESEND v10 2/3] dt-bindings: hwmon: Support Aspeed g6 PWM TACH Control Billy Tsai
2023-11-08 18:21   ` Rob Herring
2023-11-14  3:11     ` Billy Tsai
2023-11-22 20:47       ` Rob Herring
2023-11-27  5:45         ` Billy Tsai
2024-01-13  1:53           ` Rob Herring
2023-11-07 10:50 ` [PATCH RESEND v10 3/3] hwmon: (aspeed-g6-pwm-tacho): Support for ASPEED g6 PWM/Fan tach Billy Tsai
2023-11-07 19:02 ` [PATCH RESEND v10 0/3] Support pwm/tach driver for aspeed ast26xx Guenter Roeck
2023-12-06 17:48   ` Uwe Kleine-König
2023-12-06 17:56     ` Krzysztof Kozlowski
2023-12-13  3:23       ` Billy Tsai

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=d3204361-2d4c-41f9-8365-5826195aa884@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=BMC-SW@aspeedtech.com \
    --cc=andrew@aj.id.au \
    --cc=billy_tsai@aspeedtech.com \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=joel@jms.id.au \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=naresh.solanki@9elements.com \
    --cc=p.zabel@pengutronix.de \
    --cc=patrick@stwcx.xyz \
    --cc=robh@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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).