Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5997185rwb; Tue, 1 Aug 2023 10:42:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlHBIyonxtpFgO98bjpRbel656nrbb3bG9mWNkI1Vfpuh8ZMTH3aqFqGRz/TIavFqhg6fY9q X-Received: by 2002:a17:907:77cd:b0:99b:cb7a:c164 with SMTP id kz13-20020a17090777cd00b0099bcb7ac164mr2246237ejc.62.1690911747568; Tue, 01 Aug 2023 10:42:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690911747; cv=none; d=google.com; s=arc-20160816; b=CEmxJc90TxT/gHKjknxV9zRSynkJsLQEqTKdwshSuIu8rRbt/ya9zaIqT72jU25jaE QGN01Lg0j7fg7cFIFBBMTY3RsjlK8l/CIxGMO9lobctyocqRG7B8A28gyGUfL+k0u2xf ghYWGLPHZ8FzET6FeAvF8Jv3Fv17pIQGYyRlx63UiIy+UdAea/k8GNNxZUWcsKQsi/iw ui55cja/aeMSC3NUhrm+s3HNVAt8BmnRThuig8S83Ihup9jCLJZn4PI/RUaE8h/kllfG Z0fKtGQs1y1DmHM7mzOkKTfM++yHWmaQTFavgKqr58lSsomViN3QGXvK0q9dbngkdFs9 RXIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=+hCZqKkl+A1+E9891QyudSLTPqzu0GjLYUHFh1TDRUw=; fh=iUTvSxfWkZ3Ylxh1pMWk6wpzKHpWoUhPh/4KRuzQmb0=; b=P7xqaVKl0almBsfH/Om3HeUmmlZ42J4ELypiB+MyqnSVOnbhqDNc+RR/M2xxcU4p00 ++QKVCJLBliZZ9/JsBLAsOHIU6SvSh2V9IsiBnu9KeNmI4eaUzYzeUmjtPyCzXjkIcIe GGUtA226Vg6ovHkPQ4Pi/c+nyuoPAfuNWow38Z2wppns/e/IKVngz7QQGhnpnccqpA7B xEUxAzloTIse654Aj91ETQ14WcUbU8aAeSCmObAUBjYAAWBejS5uvgEEeZRjyTlkTugr jWA9VFsjUQNZ4J2a4SCppnh87uyKlQ5vZVG60WN//jnBktMXdtTGOwnyIHWllRItzMVf /+8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g14-20020a1709061c8e00b00992a9b11cf2si8306168ejh.787.2023.08.01.10.41.58; Tue, 01 Aug 2023 10:42:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231269AbjHAQgY (ORCPT + 99 others); Tue, 1 Aug 2023 12:36:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229978AbjHAQgW (ORCPT ); Tue, 1 Aug 2023 12:36:22 -0400 Received: from wp534.webpack.hosteurope.de (wp534.webpack.hosteurope.de [80.237.130.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0B2D1BFD; Tue, 1 Aug 2023 09:36:17 -0700 (PDT) Received: from [2001:a61:6215:d040:c80a:ff:fe00:409d] (helo=cs-wrt.lan.local); authenticated by wp534.webpack.hosteurope.de running ExIM with esmtpa id 1qQsM0-0007BE-KR; Tue, 01 Aug 2023 18:36:12 +0200 From: =?UTF-8?q?Carsten=20Spie=C3=9F?= To: =?UTF-8?q?Carsten=20Spie=C3=9F?= , Jean Delvare , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Magnus Damm Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH v3 2/2] dt-bindings: hwmon: add renesas,isl28022 Date: Tue, 1 Aug 2023 18:35:46 +0200 Message-Id: <20230801163546.3170-3-mail@carsten-spiess.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230801163546.3170-1-mail@carsten-spiess.de> References: <20230801163546.3170-1-mail@carsten-spiess.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-bounce-key: webpack.hosteurope.de;mail@carsten-spiess.de;1690907778;8db166c8; X-HE-SMSGID: 1qQsM0-0007BE-KR X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, T_SPF_TEMPERROR,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add dt-bindings for Renesas ISL28022 power monitor. Signed-off-by: Carsten Spieß --- v3: - changelog added v2/v3: - schema errors fixed - properties reworked - shunt-resistor minimum and default value added --- .../bindings/hwmon/renesas,isl28022.yaml | 65 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 66 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/renesas,isl28022.yaml diff --git a/Documentation/devicetree/bindings/hwmon/renesas,isl28022.yaml b/Documentation/devicetree/bindings/hwmon/renesas,isl28022.yaml new file mode 100644 index 000000000000..1e0971287941 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/renesas,isl28022.yaml @@ -0,0 +1,65 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/renesas,isl28022.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas ISL28022 power monitor + +maintainers: + - Carsten Spieß + +description: | + The ISL28022 is a power monitor with I2C interface. The device monitors + voltage, current via shunt resistor and calculated power. + + Datasheets: + https://www.renesas.com/us/en/www/doc/datasheet/isl28022.pdf + +properties: + compatible: + enum: + - renesas,isl28022 + + reg: + maxItems: 1 + + shunt-resistor-micro-ohms: + description: | + Shunt resistor value in micro-Ohm + minimum: 800 + default: 10000 + + renesas,shunt-range-microvolt: + description: | + Maximal shunt voltage range of +/- 40 mV, 80 mV, 160 mV or 320 mV + default: 320000 + enum: [40000, 80000, 160000, 320000] + + renesas,average-samples: + description: | + Number of samples to be used to report voltage, current and power values. + default: 1 + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [1, 2, 4, 8, 16, 32, 64, 128] + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + power-monitor@40 { + compatible = "renesas,isl28022"; + reg = <0x40>; + shunt-resistor-micro-ohms = <8000>; + renesas,shunt-range-microvolt = <40000>; + renesas,average-samples = <128>; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index b02e3b991676..23b8e8183ece 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11069,6 +11069,7 @@ ISL28022 HARDWARE MONITORING DRIVER M: Carsten Spieß L: linux-hwmon@vger.kernel.org S: Maintained +F: Documentation/devicetree/bindings/hwmon/renesas,isl28022.yaml F: Documentation/hwmon/isl28022.rst F: drivers/hwmon/isl28022.c -- 2.34.1