Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1262407rwb; Wed, 26 Jul 2023 09:47:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlERMLqVCtkMgIAdlMnG/WriiDCDNcHz5EC4m0VQ/jlEzuhffaQJNN+/C41GQfw1AuJ3RChd X-Received: by 2002:a05:6a21:66c7:b0:12d:f1ac:e2cd with SMTP id ze7-20020a056a2166c700b0012df1ace2cdmr2204949pzb.32.1690390046181; Wed, 26 Jul 2023 09:47:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690390046; cv=none; d=google.com; s=arc-20160816; b=KSfOUOJbd6TRZrFfVQ+FToAAk1cgjB95F4RQcMdRQbnc9t7WkZrkMzIlFoaAy2WWQV i8pVJ9/nl+76tx+m8oBDWGif9gUp1AZC39zWT7OffCtciQDcIIcO1rP/BFul3KYnUcRP pPiZK0sC0uApyDL/C0YMYWYTixM9vGXdYPU+3tOcFL/ZCIQ0BJYGfQwEfAAJytDNB6wL XDRohXBtOSvhbdQARZ0vt41YbUhxg3D78yWzI7o0QIJlq/+9eIveiSSYTsTgmI4fyET4 xxBmMKj8cu8YKzktaebf7ejDHWHxP1NuOXx1hIRYmWQITfvLcBcHKCqAB2n9Z+HurwVG zHIA== 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=TY+FYkQNJETuVS+gWvLNazQC+0c0Icb+k/pdCxPtYqQ=; fh=iUTvSxfWkZ3Ylxh1pMWk6wpzKHpWoUhPh/4KRuzQmb0=; b=U551qsEjKSqP29D37Qvb7pSW5XwuJtybQbmdqyuOOntz6k5LPfNuPT0NHzCDPrqruP NeptavOwznKtMcUgTRP1n+pp9LH2JVNPNlgIV4SxrsFQo5+5toHlxX4O2sItCNWO5Uxt a7K8mJ8EhLd1Oc8HDKvtaj46VB02O6/tFYjUgp/uaOm4X/gQzB7Gc0ixWNb2PbjR52dQ +2ugnO0uAg7dFnV8VCQt0EWziKBsKCBPbMdEveHHbWlw6bPqVtjCqmHJXSrdFLvPgtS+ 24593I7ON38DmhyDFNlAsR3xoFGl81SAE+jwETJveCRdvLBAfDacJAzaMYH/562Flgwo zsrw== 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 i1-20020a63d441000000b0055ffed90cc9si13151294pgj.609.2023.07.26.09.47.11; Wed, 26 Jul 2023 09:47:26 -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 S231423AbjGZQnv (ORCPT + 99 others); Wed, 26 Jul 2023 12:43:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230378AbjGZQns (ORCPT ); Wed, 26 Jul 2023 12:43:48 -0400 Received: from wp534.webpack.hosteurope.de (wp534.webpack.hosteurope.de [80.237.130.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C4D926BC for ; Wed, 26 Jul 2023 09:43:46 -0700 (PDT) Received: from [2001:a61:6206:cc01:c80a:ff:fe00:19d] (helo=cs-wrt.lan.local); authenticated by wp534.webpack.hosteurope.de running ExIM with esmtpa id 1qOgLj-0000ce-5j; Wed, 26 Jul 2023 17:22:51 +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 2/2] dt-bindings: hwmon: add renesas,isl28022 Date: Wed, 26 Jul 2023 17:22:34 +0200 Message-Id: <20230726152235.249569-3-mail@carsten-spiess.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230726152235.249569-1-mail@carsten-spiess.de> References: <20230726152235.249569-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;1690389826;c9e903ef; X-HE-SMSGID: 1qOgLj-0000ce-5j X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 Renesase ISL28022 power monitor. Signed-off-by: Carsten Spieß --- .../bindings/hwmon/renesas,isl28022.yaml | 67 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 68 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..5ecf892db269 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/renesas,isl28022.yaml @@ -0,0 +1,67 @@ +# 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 + +Required properties: + compatible: + enum: + - renesas,isl28022 + + reg: + maxItems: 1 + +Optional properties: + shunt-resistor-micro-ohms: + description: + Shunt resistor value in micro-Ohm + defaults to <0> when not set + monitoring of current and power not supported when <0> + + shunt-gain: + description: + Shunt gain to scale maximal shunt voltage to + 40mV, 80mV, 160mV, 320mV + defaults to <8> (320mV) when not set + enum: [1, 2, 4, 8] + + average: + description: | + Number of samples to be used to report voltage, current and power values. + defaults to <0> when not set + enum: [0, 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 = <0x10>; + shunt-resistor-micro-ohms = <8000>; + shunt-gain = <1>; + average = <128>; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index c61aa688cd11..ec9b97ace50b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11076,6 +11076,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