devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: michaelsh@nvidia.com
Cc: linux@roeck-us.net, linux-hwmon@vger.kernel.org,
	devicetree@vger.kernel.org, vadimp@nvidia.com
Subject: Re: [PATCH hwmon-next v2 2/3] dt-bindings: hwmon: add Microchip EMC2305 fan controller.
Date: Wed, 25 May 2022 21:11:34 -0500	[thread overview]
Message-ID: <20220526021134.GA2908133-robh@kernel.org> (raw)
In-Reply-To: <20220524161755.43833-3-michaelsh@nvidia.com>

On Tue, May 24, 2022 at 07:17:54PM +0300, michaelsh@nvidia.com wrote:
> From: Michael Shych <michaelsh@nvidia.com>
> 
> Add basic description of emc2305 driver device tree binding.
> 
> Signed-off-by: Michael Shych <michaelsh@nvidia.com>
> Reviewed-by: Vadim Pasternak <vadimp@nvidia.com>
> ---
> v1->v2
> - Fix dt binding check errors;
> - Add descriptions;
> - Add missing fields;
> - Change the patch subject name;
> - Separate pwm-min, pwm-max per PWM channel.
> ---
>  .../bindings/hwmon/microchip,emc2305.yaml          | 87 ++++++++++++++++++++++
>  1 file changed, 87 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/microchip,emc2305.yaml
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/microchip,emc2305.yaml b/Documentation/devicetree/bindings/hwmon/microchip,emc2305.yaml
> new file mode 100644
> index 000000000000..0aa65dcfd238
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/microchip,emc2305.yaml
> @@ -0,0 +1,87 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +
> +$id: http://devicetree.org/schemas/hwmon/microchip,emc2305.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Microchip EMC2305 RPM-based PWM Fan Speed Controller
> +
> +maintainers:
> +  - Michael Shych <michaelsh@nvidia.com>
> +
> +description: |
> +  Microchip EMC2301/2/3/5 are RPM-based PWM Fan Controller.
> +  The Fan Controller supports up to 5 independently controlled PWM fan drives.
> +  Fan rotation speeds are reported in RPM.
> +
> +  Datasheet: https://www.microchip.com/en-us/product/EMC2305
> +
> +properties:
> +  compatible:
> +    enum:
> +      - microcip,emc2305
> +      - microcip,emc2303
> +      - microcip,emc2302
> +      - microcip,emc2301

typo.

> +
> +  microchip,pwm-channel:
> +    description:
> +      Max number of pwm channels.
> +      Zero index is used in case of one common PWM setting.
> +      Number of used separted pwm channels can be less than
> +      maximum number of available pwm chnnels on this FAN controller.
> +    $ref: /schemas/types.yaml#/definitions/uint8
> +    items:
> +      minimum: 0
> +      maximum: 5
> +      default: 0
> +    maxItems: 1
> +
> +  microchip,cooling-levels:
> +    description:
> +      Quantity of cooling level state.
> +    $ref: /schemas/types.yaml#/definitions/uint8
> +    items:
> +      minimum: 0
> +      maximum: 10
> +      default: 10
> +    maxItems: 1
> +
> +  microchip,pwm-min:
> +    description:
> +      Min pwm of emc2305
> +    $ref: /schemas/types.yaml#/definitions/uint8
> +    default: 0
> +    maxItems: 1
> +
> +  microchip,pwm-max:
> +    description:
> +      Max pwm of emc2305
> +    $ref: /schemas/types.yaml#/definitions/uint8
> +    default: 255
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    fan {
> +        microchip,compatible = "microchip,emc2305";

microchip,compatible?? Again...

The bigger problem remains of this needing a common fan and fan 
controller bindings.

Rob

> +        microchip,pwm-channel = <5>;
> +        microchip,cooling-levels = <10>;
> +        microchip,pwms {
> +            pwm@0 {
> +                      pwm-min = <0>;
> +                      pwm-max = <255>;
> +            };
> +            pwm@1 {
> +                      pwm-min = <0>;
> +                      pwm-max = <255>;
> +            };
> +        };
> +    };
> +
> -- 
> 2.14.1
> 
> 

  parent reply	other threads:[~2022-05-26  2:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-24 16:17 [PATCH hwmon-next v2 0/3] Add support for EMC2305 Fan Speed Controller michaelsh
2022-05-24 16:17 ` [PATCH hwmon-next v2 1/3] hwmon: (emc2305) add support for EMC2301/2/3/5 RPM-based PWM " michaelsh
2022-05-24 16:17 ` [PATCH hwmon-next v2 2/3] dt-bindings: hwmon: add Microchip EMC2305 fan controller michaelsh
2022-05-25 12:44   ` Rob Herring
2022-05-26  2:11   ` Rob Herring [this message]
2022-05-26  5:24     ` Guenter Roeck
2022-05-24 16:17 ` [PATCH hwmon-next v2 3/3] docs: hwmon: add emc2305.rst to docs michaelsh

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=20220526021134.GA2908133-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=michaelsh@nvidia.com \
    --cc=vadimp@nvidia.com \
    /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 NNTP newsgroup(s).