Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2993672imw; Sun, 17 Jul 2022 23:03:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sl6Z/5mC5cg2UaQ6Fhs95f/2gc7H0n/8wajUlDt12PqRsyMSb6fk6125bxK/mgOQs1EVSk X-Received: by 2002:a65:6898:0:b0:415:cee6:5f1e with SMTP id e24-20020a656898000000b00415cee65f1emr23580552pgt.397.1658124194481; Sun, 17 Jul 2022 23:03:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658124194; cv=none; d=google.com; s=arc-20160816; b=iXnJyfwL0QTiQiZGcOGDZLaJWrKeW34jDYtgzP3enk9MHl6n0qItWgaLO72LKV/+BR jkDUL/E0hWKiGmYaKME/8DRR2hq/YiR7QVlM8DTv+Sqinxq+EaJreugzHBoIytm/aboK rhJ99F2bokr0K1S9LItG0WbrLLzx46jnxsQ1PoGg0Iro+1SjM1tukySap9qe4UM0pbf/ rM+WN9Hj4wIQI7fjaDqYe4SbIN5R5NFIGMbDXjGROfWgwts3iWPVQDm7ik5kJFZOjPHT IupJHAB+s3aRYogVenukPtp0UVouqfGa4nRbC7neZmfG+jlpPOuxjklRAakQhG2VLb4G zxnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=WDks3qDrWxLLtCzjVaMIFrgSz1H5Uq4a3TXwwtZzFxU=; b=AAbm3gEFHh6KLXQ1qmvbDjWlEl+X8Z7ozp4meexLwUeo3nEbLyJy2xpo4BhpJj2CCx mRswZncxtlW3mt9wjYFKSoWGBw2k4XmQPJYK6Jm8x9AraXKza755LRgO5du7oJ1gk3V2 seDA+JIjmzXYQotx7ruRjMwryyKGKQ1Vh0ToZ84itru9LNB+3Sdu4YUysDQuffVnZY0W 9pu6JOhXmhFVtdSzN6wVpKfWaPGSm888sc0BLHk977ykdf54jfU52/NpZOH/ABmel8W1 0Jp9K1MYH9EKqr2OC1Z3U/Wjuez+1LTEKSpNXHtAFmpLywcjku5RyNgyRm3IHKjxgHyO 7mkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qSohyQgZ; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e8-20020a17090301c800b0016c40bcd00dsi17223542plh.159.2022.07.17.23.02.56; Sun, 17 Jul 2022 23:03:14 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qSohyQgZ; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233339AbiGRFqX (ORCPT + 99 others); Mon, 18 Jul 2022 01:46:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233090AbiGRFqP (ORCPT ); Mon, 18 Jul 2022 01:46:15 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7339E13E95; Sun, 17 Jul 2022 22:46:14 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id b9so9709928pfp.10; Sun, 17 Jul 2022 22:46:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WDks3qDrWxLLtCzjVaMIFrgSz1H5Uq4a3TXwwtZzFxU=; b=qSohyQgZWNj5S4idc0/JGpMQD4sS7/yNRT2duzbMxdEfHeXKykEFllaiH3k1xWdx1W 4SVkB4yVhv/Lz3hBBXBuLm3R1b04mVMf2egZCw5pfTTxBRgyn1ZPpqEWGYWOsoAArBc9 zRq5ITMNWpawbg4wlGUoeWbs2GdGzq0lExzutYLVwXrdt5dz+fVUjbXbBTId9XEdXmYA rJhN7TCWUDmHD2rGt0tTrT3WEfN8kzM2USg9oev2P9Zn6M9wcr8qa2a1XBu3pOC+COR6 qpLT9G6neMxhLBtJ/l69ug05mknGqFb8NjnVlijo66iDhZcsmzPksVo4dzd0E+E/VYvX Kl6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WDks3qDrWxLLtCzjVaMIFrgSz1H5Uq4a3TXwwtZzFxU=; b=4/kpSNWURDOlt6O4qq+jKi2okZ/lG9+gmOsC+pceiSzx34ypHviqal03/7BA0LVBiO JsYbauLki2POfUgfvNkC3xLc57mOhDr7pfn0eJ0O1Yp4CPBOOI2mrbCT9DgDJggq0g0T 1rAr4PAB0gQ1WX1tDJ1m9Y9B6+hShzbusr+d2T7e9eKyUQUCD5wjy4M5OHZau6CnZXgL qVv2iLDApuTsrON3Qn05N7eUq4+5mtjHziLGLgRydViKquFQg8TRt57VgrENre86Yq8m sv0YLNHwcsmKonIwD7zEKoXUcFtqO4NXuyGX5cyZct3MmoeNElr6Luo7MFRNoPIa6E3F hBEA== X-Gm-Message-State: AJIora97PwsMSfMlr7lKWU94t+k6fdPa+/ocjxUREg0oHz4My5IIuCWm ykcXUYVVOvmf5gCNyX25/BnjCHvfPQ4= X-Received: by 2002:a05:6a00:a06:b0:51e:47f5:79ad with SMTP id p6-20020a056a000a0600b0051e47f579admr26691399pfh.53.1658123173815; Sun, 17 Jul 2022 22:46:13 -0700 (PDT) Received: from localhost.localdomain ([2402:7500:587:e7ad:4982:5f13:5219:614d]) by smtp.gmail.com with ESMTPSA id c66-20020a621c45000000b00528ce53a4a6sm8147951pfc.196.2022.07.17.22.46.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Jul 2022 22:46:13 -0700 (PDT) From: cy_huang To: jic23@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: lars@metafoo.de, cy_huang@richtek.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v7 1/3] dt-bindings: iio: adc: Add rtq6056 adc support Date: Mon, 18 Jul 2022 13:46:01 +0800 Message-Id: <1658123163-10039-2-git-send-email-u0084500@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1658123163-10039-1-git-send-email-u0084500@gmail.com> References: <1658123163-10039-1-git-send-email-u0084500@gmail.com> X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 From: ChiYuan Huang Add the documentation for Richtek rtq6056. Signed-off-by: ChiYuan Huang Reviewed-by: Krzysztof Kozlowski --- Since v3 - change the node name to be generic 'adc' in binding example. Since v2 - Change the resistor property name to be generic 'shunt-resistor-micro-ohms'. --- .../bindings/iio/adc/richtek,rtq6056.yaml | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml diff --git a/Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml b/Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml new file mode 100644 index 00000000..88e0086 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml @@ -0,0 +1,56 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/richtek,rtq6056.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: RTQ6056 Bi-Directional Current and Power Monitor with 16-bit ADC + +maintainers: + - ChiYuan Huang + +description: | + The RTQ6056 is a high accuracy current-sense monitor with I2C and SMBus + interface, and the device provides full information for system by reading + out the loading current and power. + + The device monitors both of the drops across sense resistor and the BUS + voltage, converts into the current in amperes, and power in watts through + internal analog-to-digital converter ADC. The programmable calibration, + adjustable conversion time, and averaging function are also built in for + more design flexibility. + + Datasheet is available at + https://www.richtek.com/assets/product_file/RTQ6056/DSQ6056-00.pdf + +properties: + compatible: + const: richtek,rtq6056 + + reg: + maxItems: 1 + + "#io-channel-cells": + const: 1 + + shunt-resistor-micro-ohms: + description: Shunt IN+/IN- sensing node resistor + +required: + - compatible + - reg + - "#io-channel-cells" + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + adc@40 { + compatible = "richtek,rtq6056"; + reg = <0x40>; + #io-channel-cells = <1>; + }; + }; -- 2.7.4