Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2640860rdh; Wed, 27 Sep 2023 08:27:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFFfj1EmpQuvhMWcY7GinkoyvcnQzqUYzpGgJMSXGifHnOdJ2DrZmmrH0Mji9pNy2OASLM9 X-Received: by 2002:a05:6a20:3951:b0:133:f0b9:856d with SMTP id r17-20020a056a20395100b00133f0b9856dmr2535204pzg.17.1695828433818; Wed, 27 Sep 2023 08:27:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695828433; cv=none; d=google.com; s=arc-20160816; b=mumQKbUv4zQc3Nz+PWIuB658KccLwHvV1uZZ9gmniEWCqZlGIKbkPWrTJLltTLmZWC UnW9h1q3Xij3J30ZSXkKml0+IRRRNrMIm+/b43myXAj8ReL66LZnCPy8Fskd8aqneg5q mFByD9sFbFezGCRKe4ylcmzvgRumTDhG/5h8M9futfGo0H+CJazzXK/a8b9mmbZzNr5H //MgxtWSVI293rVaXsNThZKsTY9muJDN/1pAa/cw2EBtpiMz82bbU9jN0S15UdLMwFUt Zm2Psr0oDRgL+eZLU+KNHS49FmYpASspUfBdNfWrS/haNL6iJCIxArmER8Nw/QeXQwVw 5nCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=H2q/3WnA3iv3o8uTx3Vcof1CqBCrSOW8KSuAyeRjz1A=; fh=NVbW1UFqqIxTwIlWyivg0SltsdEPRUqzJL3QDbKQnXY=; b=DjmxUgsfAChzklrS5KUxP34S84cpSC8kPRMhEzsTHs3wHqUQ4hWFJYyLGPG3ePy8mo lfV3TKzoFXgNqHpYJRj5A8ovKmdyY6Rr2cn/DitWmuCPWBVULFVyBgtaDOQDdnKyhU76 8b3F3smJrNdTPRRUO4vytwBqagIcS82JkVTOZjnKe7icMQ+r+29BZPHoSrGQgnA8Hkfy nuGl5q4cFQ1aYGzKNPRiDOEVK6SMwFrIL1h4hTKwqlk/qWxWN1qa5a8pJT7MdLFGNjBK fAYlBnulvyaYG3wuZytCkHoy9ouNjo/pcUgFgACvleUWSoHLyis0rj+AazEYfwlhzD9s ut6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=G89s4vfL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id kx13-20020a170902f94d00b001b8698d28d4si15248189plb.512.2023.09.27.08.27.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 08:27:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=G89s4vfL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 334A08056C5A; Wed, 27 Sep 2023 08:19:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232405AbjI0PTf (ORCPT + 99 others); Wed, 27 Sep 2023 11:19:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230274AbjI0PTe (ORCPT ); Wed, 27 Sep 2023 11:19:34 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E1581AA; Wed, 27 Sep 2023 08:19:31 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CEDFC433C7; Wed, 27 Sep 2023 15:19:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695827970; bh=KMukbBBeXV+l1cuq0Jp1Wo0ccigkbIimAikppeeUBdo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=G89s4vfLyLbRHxXx784woGm8pxlfza/V2sFYJjv8+uizc/xzGdCPdbR3lMo4D1xFh Zc1Mv0GuT0foHxGRV27J4PRopQVoQ2DR2QIuX4d0qQqkpYzwGzv0UVkc0lNa99D8Tp /1zbmrvFTealguaZAdaE5va8auj5qpgGhXstXoz3yYxzCROEHE0nm/yPVtJs/I68pq 8YznlGWm8GV8bccFmcs2gCM+xWo2L1idm7fkLyN1BZW5UAo1iz8KMl0oAAIhw4ULHs emrcjptFlj7UU/hf+TguuP4d2Que/MrSTMxhiLuekfgLhWcxUcqEmi/ToTHkb5n3Ln tv4IaJVK+WKog== Date: Wed, 27 Sep 2023 16:19:26 +0100 From: Conor Dooley To: Antoniu Miclaus Cc: Jean Delvare , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet , linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH 1/2] dt-bindings: hwmon: ltc2991: add bindings Message-ID: <20230927-curve-trodden-5f8f150aa738@spud> References: <20230926140544.80934-1-antoniu.miclaus@analog.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="iuF1VGb0w26bLJMI" Content-Disposition: inline In-Reply-To: <20230926140544.80934-1-antoniu.miclaus@analog.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 27 Sep 2023 08:19:57 -0700 (PDT) --iuF1VGb0w26bLJMI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Tue, Sep 26, 2023 at 05:05:29PM +0300, Antoniu Miclaus wrote: > Add dt-bindings for ltc2991 octal i2c voltage, current and temperature > monitor. >=20 > Signed-off-by: Antoniu Miclaus > --- > .../bindings/hwmon/adi,ltc2991.yaml | 114 ++++++++++++++++++ > 1 file changed, 114 insertions(+) > create mode 100644 Documentation/devicetree/bindings/hwmon/adi,ltc2991.y= aml >=20 > diff --git a/Documentation/devicetree/bindings/hwmon/adi,ltc2991.yaml b/D= ocumentation/devicetree/bindings/hwmon/adi,ltc2991.yaml > new file mode 100644 > index 000000000000..6174e0113ef8 > --- /dev/null > +++ b/Documentation/devicetree/bindings/hwmon/adi,ltc2991.yaml > @@ -0,0 +1,114 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > + > +$id: http://devicetree.org/schemas/hwmon/adi,ltc2991.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Analog Devices LTC2991 Octal I2C Voltage, Current and Temperature= Monitor > + > +maintainers: > + - Antoniu Miclaus > + > +description: | > + The LTC2991 is used to monitor system temperatures, voltages and curre= nts. > + Through the I2C serial interface, the eight monitors can individually = measure > + supply voltages and can be paired for differential measurements of cur= rent > + sense resistors or temperature sensing transistors. > + > + Datasheet: > + https://www.analog.com/en/products/ltc2991.html > + > +properties: > + compatible: > + enum: > + - adi,ltc2991 if you aren't expecting to add other devices that can share the binding, make this const: rather than enum:. > + > + reg: > + maxItems: 1 > + > + '#address-cells': > + const: 1 > + > + '#size-cells': > + const: 0 > + > + vcc-supply: true > + > +patternProperties: > + "^channel@[0-3]$": > + type: object > + description: | The |s are only needed when you have formatting to preserve. > + Represents the differential/temperature channels. > + > + properties: > + reg: > + description: | > + The channel number. LTC2992 can monitor 4 currents/temperature= s. > + items: > + minimum: 0 > + maximum: 3 > + > + shunt-resistor-mili-ohms: The standard properties here are ohms and micro-ohms. Also, "milli" has 2 ls. > + description: > + The value of curent sense resistor in miliohms. Enables differ= ential > + input pair. > + > + temperature-enable: This seems like a vendor property that should have a vendor prefix? > + description: > + Enables temperature readings for a input pair. TBH, this seems like it is used just to control software behaviour. Why would you want to actually disable this in DT? Cheers, Conor. > + > +required: > + - compatible > + - reg > + - vcc-supply > + > +additionalProperties: false > + > +examples: > + - | > + i2c { > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + > + hwmon@48 { > + compatible =3D "adi,ltc2991"; > + reg =3D <0x48>; > + vcc-supply =3D <&vcc>; > + }; > + }; > + - | > + i2c { > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + > + hwmon@48 { > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + > + compatible =3D "adi,ltc2991"; > + reg =3D <0x48>; > + vcc-supply =3D <&vcc>; > + > + channel@0 { > + reg =3D <0x0>; > + shunt-resistor-mili-ohms =3D <100>; > + }; > + > + channel@1 { > + reg =3D <0x1>; > + shunt-resistor-mili-ohms =3D <100>; > + }; > + > + channel@2 { > + reg =3D <0x2>; > + temperature-enable; > + }; > + > + channel@3 { > + reg =3D <0x3>; > + temperature-enable; > + }; > + }; > + }; > +... > --=20 > 2.42.0 >=20 --iuF1VGb0w26bLJMI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZRRH/QAKCRB4tDGHoIJi 0qHwAQCiWCU/Tlc8g1FHrSZV758HOtDVXDLRKZCW+A9AyAh69wEAuzrvI4A+tcmf x7zyh1FMSN2R7D9AznlAoNIKPIT60A8= =g7xt -----END PGP SIGNATURE----- --iuF1VGb0w26bLJMI--