From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 903F9ECAAD8 for ; Fri, 23 Sep 2022 11:09:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231152AbiIWLJI (ORCPT ); Fri, 23 Sep 2022 07:09:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229688AbiIWLJH (ORCPT ); Fri, 23 Sep 2022 07:09:07 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCC57118DFA for ; Fri, 23 Sep 2022 04:09:04 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id j6-20020a17090a694600b00200bba67dadso5100441pjm.5 for ; Fri, 23 Sep 2022 04:09:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9elements.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=272D0hG/Ha0B1Yebkuj63s7D6j3RhV9b5TJtxOtd/ok=; b=U/IDhz3ZCT6WmB6ym3aAigDGVN/Op726Rzt5Ab6W9uCPDDZ7mqHeMi6aft4DTu55LR pi9XKbcSpLzOaGHSlQoi6G394meWU0MmsgGEiZqhtZ3zepJYWwJXKKSG7inPdBlhvsJI tNR93IGc4Ro6bgVKgTdlCIC0bFFj8zgZx+zIXYdH1GMFpDEZy5XobMe2d08OmsvKEBrk gmbL4k7gbSSW1ULEHlS+fN2sQpiPELk7uR5ePW6c/RMsi/cLqKLS124g50jnjIcrTuvU dvPPZ/jsYrrKWqtkRbzFQ2EF7WqrCkSI8I7G4gTkYYY9Dpu3X14zSmYFwW293k9Na/7n 28JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=272D0hG/Ha0B1Yebkuj63s7D6j3RhV9b5TJtxOtd/ok=; b=hU/9MRpOxvTXffg8T5nXAY/IV7Ug6wmgNa/XWx4FenjUyQQeC+arQ8X9kFTSnb90Cs FJjAhcN+pY4tTjyH6pafmOn1CMvsY2q2oZcnSzQuVp3Sh/aUq/8xaoXS9dPwfvsgMWin uKT05L5ipvppK7tv6piOeCG8PFwryvpGNqSNg+jELKekJhxuIqz4uG5bvo7JwniZb6ex RQ0O2y8SyukPl2AORiIL1eGUWg1nTqolWw5DWx9Of2PQEt6dyf5ndUwgN2g/zc1gMVm6 //0Pmvf78BzU5/oVNsNGkz2mZ8t6UGs2bMoBfUhjTIG4q+GSoUPsvBOaLA2x4S6grd0y cpRA== X-Gm-Message-State: ACrzQf1BONA1kpJ3jdjWhkNyaGB+H1IBJ4K6ge1BuEOczr3DNKxR0QXz OMFDPg5/vHynOLGEJPz15e0QfxswTGx5kpAJ/v3KFw== X-Google-Smtp-Source: AMsMyM54bHzAx6TnOAho9bwOMUXQO5P+GU/uo7LLC0vqoBySGFXpPNHg0Si+bJHtTUWiCxWVQgnyh1MhIrW5nzXyD1k= X-Received: by 2002:a17:903:25c4:b0:178:b625:e9f6 with SMTP id jc4-20020a17090325c400b00178b625e9f6mr8010749plb.120.1663931343800; Fri, 23 Sep 2022 04:09:03 -0700 (PDT) MIME-Version: 1.0 References: <20220922050718.1079651-1-Naresh.Solanki@9elements.com> <20220922050718.1079651-2-Naresh.Solanki@9elements.com> In-Reply-To: <20220922050718.1079651-2-Naresh.Solanki@9elements.com> From: Patrick Rudolph Date: Fri, 23 Sep 2022 13:09:11 +0200 Message-ID: Subject: Re: [PATCH 1/2] dt-bindings: hwmon: Add binding for max6639 To: Naresh Solanki Cc: devicetree@vger.kernel.org, Guenter Roeck , Jean Delvare , Rob Herring , Krzysztof Kozlowski , Roland Stigge , linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, Marcello Sylvester Bauer Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu, Sep 22, 2022 at 7:07 AM Naresh Solanki wrote: > > From: Marcello Sylvester Bauer > > Add Devicetree binding documentation for Maxim MAX6639 temperature > monitor with PWM fan-speed controller. > > Signed-off-by: Marcello Sylvester Bauer > Signed-off-by: Naresh Solanki > --- > .../bindings/hwmon/maxim,max6639.yaml | 112 ++++++++++++++++++ > 1 file changed, 112 insertions(+) > create mode 100644 Documentation/devicetree/bindings/hwmon/maxim,max6639.yaml > > diff --git a/Documentation/devicetree/bindings/hwmon/maxim,max6639.yaml b/Documentation/devicetree/bindings/hwmon/maxim,max6639.yaml > new file mode 100644 > index 000000000000..c845fb989af2 > --- /dev/null > +++ b/Documentation/devicetree/bindings/hwmon/maxim,max6639.yaml > @@ -0,0 +1,112 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > + > +$id: http://devicetree.org/schemas/hwmon/maxim,max6639.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Maxim max6639 > + > +maintainers: > + - Roland Stigge > + > +description: | > + The MAX6639 is a 2-channel temperature monitor with dual, automatic, PWM > + fan-speed controller. It monitors its own temperature and one external > + diode-connected transistor or the temperatures of two external diode-connected > + transistors, typically available in CPUs, FPGAs, or GPUs. > + > + Datasheets: > + https://datasheets.maximintegrated.com/en/ds/MAX6639-MAX6639F.pdf > + > +properties: > + compatible: > + enum: > + - maxim,max6639 > + > + reg: > + maxItems: 1 > + > + '#address-cells': > + const: 1 > + > + '#size-cells': > + const: 0 > + > +required: > + - compatible > + - reg > + - "fan@0" > + - "fan@1" Why are both fan children required? The driver doesn't care and uses the default settings if not present. > + > +additionalProperties: false > + > +patternProperties: > + "^fan@[0-1]$": > + type: object > + description: | > + Represents the two fans and their specific configuration. > + > + properties: > + reg: > + description: | > + The fan number. > + items: > + minimum: 0 > + maximum: 1 > + > + pwm-polarity: > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: [0, 1] > + default: 1 > + description: > + PWM output is low at 100% duty cycle when this bit is set to zero. PWM > + output is high at 100% duty cycle when this bit is set to 1. > + > + pulses-per-revolution: > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: [1, 2, 3, 4] > + default: 2 > + description: > + Value specifying the number of pulses per revolution of the controlled > + FAN. > + > + maxim,rpm-range: > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: [2000, 4000, 8000, 16000] > + default: 4000 > + description: > + Scales the tachometer counter by setting the maximum (full-scale) value > + of the RPM range for max6639. > + > + required: > + - reg > + > +examples: > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + max6639@10 { > + compatible = "maxim,max6639"; > + reg = <0x10>; > + #address-cells = <1>; > + #size-cells = <0>; > + > + fan@0 { > + reg = <0x0>; > + pwm-polarity = <1>; > + pulses-per-revolution = <2>; > + maxim,rpm-range = <4000>; > + }; > + > + fan@1 { > + reg = <0x1>; > + pwm-polarity = <1>; > + pulses-per-revolution = <2>; > + maxim,rpm-range = <4000>; > + }; > + }; > + }; > +... > -- > 2.35.3 >