From patchwork Thu Sep 27 19:49:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolin Chen X-Patchwork-Id: 975874 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FUMVCpEl"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42LlkS5Jqyz9s3x for ; Fri, 28 Sep 2018 05:49:20 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728359AbeI1CJM (ORCPT ); Thu, 27 Sep 2018 22:09:12 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:41345 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727331AbeI1CJL (ORCPT ); Thu, 27 Sep 2018 22:09:11 -0400 Received: by mail-pg1-f194.google.com with SMTP id z3-v6so2690416pgv.8; Thu, 27 Sep 2018 12:49:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7AD0S7PM2qwtTJVEYgPRsvVVieRD9k75GvHvcxkbDdU=; b=FUMVCpEl5aPmIDYEcCdTcv3rRCzyrDh61nT+EegfQW1bVNiHEaIgeOgJoOxQAgVy+r YRSCOao56VCs987BDWolFt1ySd+tuFkw0Ovw9KNZrn2KP5tL0ec/QN9dwPL2rDipvT3N VgKhs4ELmMurVuAKPZezP0ad56rGlJkL+QDgwGsMi19CFAgeWXoSS5VNenNWFHxKs0KD wtDZuih0tsKB6Vo3LuJ8ZaY8UPH1pRP1P2DzkctlY02k4R+KBK1qoe0zTxtIh1SPDhOa padwLyiWit60iLxOCxn5ZfiW+eocAcEs5RYa/oz9s1jTssUP4UPDMtZapOS6+C7/AfLm AFdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7AD0S7PM2qwtTJVEYgPRsvVVieRD9k75GvHvcxkbDdU=; b=aA4vjuCUQzsCj4Lqh0kdFJYKUWuvDrMioDeLn9Fz5cKTI0v/LRr6CWveGwOYOjgNUO Kyo8AwpKeZy46dPfkzpdnhDy0nxmCkf5p7jFHruqPqxp8aIO4+jgld1ALBs5EhWCge+i inOR3anoadUXAhfUO3OUe+KkEf9eIrD48wlAh1ayzulwV7bFuIhpIjJe5q99zxNl5Zny Y+GlPa5eE6nIb+OSOrQ+/1NPgreRdfxAtUZwat86TyYamPWXatSlIm/1OCbL0cM5fVIo /6lhcqZ/m+OmQANv3JjEIRDsQi1orXBVeCQxcmOxb9FDIuqP7ERYXOCS7pBImOsMuKzz bMqg== X-Gm-Message-State: ABuFfoiI2SRQ5QqlPIq8EInwkpeipx8eBtqj2yUrsXTAJubCqRrQwg6T uy3ZpVje2OSd9+VHtiT3cgg= X-Google-Smtp-Source: ACcGV61SJ7AtGsvqtIHir+Y8pAuejexOYoF/bT/r13YZLBbQJjSzDs0WW02C9Xdz7gxqrKKHKUVXDA== X-Received: by 2002:a62:8d16:: with SMTP id z22-v6mr3582784pfd.185.1538077757094; Thu, 27 Sep 2018 12:49:17 -0700 (PDT) Received: from Asurada-Nvidia.nvidia.com (thunderhill.nvidia.com. [216.228.112.22]) by smtp.gmail.com with ESMTPSA id g65-v6sm1449850pfg.98.2018.09.27.12.49.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 12:49:16 -0700 (PDT) From: Nicolin Chen To: jdelvare@suse.com, linux@roeck-us.net, robh+dt@kernel.org, mark.rutland@arm.com, corbet@lwn.net Cc: afd@ti.com, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH v6 1/2] dt-bindings: hwmon: Add ina3221 documentation Date: Thu, 27 Sep 2018 12:49:09 -0700 Message-Id: <20180927194910.18464-2-nicoleotsuka@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180927194910.18464-1-nicoleotsuka@gmail.com> References: <20180927194910.18464-1-nicoleotsuka@gmail.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Texas Instruments INA3221 is a triple-channel shunt and bus voltage monitor. This patch adds a DT binding doc for it. Signed-off-by: Nicolin Chen --- Changelog v5->v6: * Removed status property as no need to explicitly list it. * Combined all examples into a complete one. v4->v5: * Replaced "input-id" with "reg" and added address-cells and size-cells * Replaced "input-label" with "label" * Replaced "shunt-resistor" with "shunt-resistor-micro-ohms" v3->v4: * Removed the attempt of putting labels in the node names * Added a new optional label property in the child node * Updated examples accordingly v2->v3: * Added a simple subject in the line 1 * Fixed the shunt resistor value in the example v1->v2: * Dropped channel name properties * Added child node definitions. * * Added shunt resistor property in the child node * * Added status property to indicate connection status * * Changed to use child node name as the label of input source .../devicetree/bindings/hwmon/ina3221.txt | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/ina3221.txt diff --git a/Documentation/devicetree/bindings/hwmon/ina3221.txt b/Documentation/devicetree/bindings/hwmon/ina3221.txt new file mode 100644 index 000000000000..f2dd3137bf1d --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/ina3221.txt @@ -0,0 +1,40 @@ +Texas Instruments INA3221 Device Tree Bindings + +1) ina3221 node + Required properties: + - compatible: Must be "ti,ina3221" + - reg: I2C address + + Optional properties: + = The node contains optional child nodes for three channels = + = Each child node describes the information of input source = + + - #address-cells: Required only if a child node is present. Must be 1. + - #size-cells: Required only if a child node is present. Must be 0. + + Example: + + ina3221@40 { + compatible = "ti,ina3221"; + reg = <0x40>; + #address-cells = <1>; + #size-cells = <0>; + + [ child node definitions... ] + }; + +2) child nodes + Required properties: + - reg: Must be 0, 1 or 2, corresponding to IN1, IN2 or IN3 port of INA3221 + + Optional properties: + - label: Name of the input source + - shunt-resistor-micro-ohms: Shunt resistor value in micro-Ohm + + Example: + + input@0 { + reg = <0x0>; + label = "VDD_5V"; + shunt-resistor-micro-ohms = <5000>; + };