From patchwork Thu Sep 28 12:50:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maciej Purski X-Patchwork-Id: 9975945 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 46AC06034B for ; Thu, 28 Sep 2017 12:51:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38632295BC for ; Thu, 28 Sep 2017 12:51:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CAA5295C1; Thu, 28 Sep 2017 12:51:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45782295BE for ; Thu, 28 Sep 2017 12:51:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753094AbdI1MvL (ORCPT ); Thu, 28 Sep 2017 08:51:11 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:35023 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752962AbdI1MvI (ORCPT ); Thu, 28 Sep 2017 08:51:08 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20170928125106euoutp01918f683db63b76f45d01f8a065602cf6~oh4Gkhx8F2631826318euoutp01a; Thu, 28 Sep 2017 12:51:06 +0000 (GMT) Received: from eusmges5.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170928125105eucas1p200edd6d52e83c784f8f68d8803728fbd~oh4F9aDkp3123831238eucas1p2n; Thu, 28 Sep 2017 12:51:05 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges5.samsung.com (EUCPMTA) with SMTP id 8C.37.12743.930FCC95; Thu, 28 Sep 2017 13:51:05 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170928125104eucas1p20a3ead82624005331e36b8ebeca46815~oh4FRHTIO3119931199eucas1p23; Thu, 28 Sep 2017 12:51:04 +0000 (GMT) X-AuditID: cbfec7f5-f79d06d0000031c7-f3-59ccf039ca50 Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 8B.EA.18832.830FCC95; Thu, 28 Sep 2017 13:51:04 +0100 (BST) Received: from AMDC2075.DIGITAL.local ([106.120.51.25]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OWZ00K1TQC79Y00@eusync3.samsung.com>; Thu, 28 Sep 2017 13:51:04 +0100 (BST) From: Maciej Purski To: devicetree@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-iio@vger.kernel.org Cc: Rob Herring , Mark Rutland , Guenter Roeck , Jean Delvare , Jonathan Corbet , Russell King , Kukjin Kim , Krzysztof Kozlowski , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Bartlomiej Zolnierkiewicz , Marek Szyprowski , Maciej Purski Subject: [PATCH 3/4] dt-bindings: hwmon: Add max-expected-current property to ina2xx Date: Thu, 28 Sep 2017 14:50:14 +0200 Message-id: <1506603015-27202-4-git-send-email-m.purski@samsung.com> X-Mailer: git-send-email 2.7.4 In-reply-to: <1506603015-27202-1-git-send-email-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A+NgFvrJLMWRmVeSWpSXmKPExsVy+t/xq7oWH85EGjzeYGixccZ6VosnB9oZ LeYfOcdqcXZCoMWDplVMFv2PXzNb7Pr/htni/PkN7BZLJs9ntdj0+BqrxcK2JSwW7a+3MlrM O/KOxWLG+X1MFoem7mW0eLLwDJPFgpe3WCzWHrnLbrH0+kUmi9+7jrFbtO49wu4g6rFm3hpG j8vXLjJ7fPgY57FpVSebx+Yl9R6L+yazeix5c4jV43zzEUaPnd8b2D36tqxi9Fi/5SqLx+dN cgE8UVw2Kak5mWWpRfp2CVwZu348ZSrYJ1Ax9/JZ9gbGx7xdjBwcEgImEoc+5XUxcgKZYhIX 7q1n62Lk4hASWMIo8bbrNSOE08gk0ff1DitIA5uAlsSa9niQuIjAPkaJ04/nghUxC1xkkTiz Zx0LyChhgTCJSbMPs4HYLAKqEvu23mUEsXkFXCQO/1zEBrFOTuLmuU5mEJtTwFWi6fhiMFsI qGbR407WCYy8CxgZVjGKpJYW56bnFhvqFSfmFpfmpesl5+duYgRGyLZjPzfvYLy0MfgQowAH oxIPr8bi05FCrIllxZW5hxglOJiVRHhzXp2JFOJNSaysSi3Kjy8qzUktPsQozcGiJM7bu2d1 pJBAemJJanZqakFqEUyWiYNTqoExd8I/xxO8vtODzuR+izvasG1t4QMliQ+Zdu/SX3RHFNYX 8d8vlnJ7Wevbl5OsdvF52eV7rs55h29be5x/PDnCrbRm1U/jnLi/tobXhK5/fD3DRvd5r3H6 tKSMoCtzZJJfXXobwvBX95iydUPb98g7Lk3LugK2FGxc7CzQ8+xrwMmlRtVfl9sqsRRnJBpq MRcVJwIAY4fq8YwCAAA= X-CMS-MailID: 20170928125104eucas1p20a3ead82624005331e36b8ebeca46815 X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 X-Local-Sender: =?UTF-8?B?TWFjaWVqIFB1cnNraRtTZWN1cml0eSAoVFApG1NhbXN1bmcg?= =?UTF-8?B?RWxlY3Ryb25pY3MbVHJhaW5lZSAoKQ==?= X-Global-Sender: =?UTF-8?B?TWFjaWVqIFB1cnNraRtTZWN1cml0eSAoVFApG1NhbXN1bmcg?= =?UTF-8?B?RWxlY3Ryb25pY3MbVHJhaW5lZSAoKQ==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTU=?= CMS-TYPE: 201P X-CMS-RootMailID: 20170928125104eucas1p20a3ead82624005331e36b8ebeca46815 X-RootMTR: 20170928125104eucas1p20a3ead82624005331e36b8ebeca46815 References: <1506603015-27202-1-git-send-email-m.purski@samsung.com> Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add optional max expected current property which allows calibrating the ina sensor in order to achieve requested precision. Document the changes in Documentation/hwmon/ina2xx. Signed-off-by: Maciej Purski --- Documentation/devicetree/bindings/hwmon/ina2xx.txt | 4 +++- Documentation/hwmon/ina2xx | 9 +++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/hwmon/ina2xx.txt b/Documentation/devicetree/bindings/hwmon/ina2xx.txt index 02af0d9..25ba372 100644 --- a/Documentation/devicetree/bindings/hwmon/ina2xx.txt +++ b/Documentation/devicetree/bindings/hwmon/ina2xx.txt @@ -14,11 +14,13 @@ Optional properties: - shunt-resistor Shunt resistor value in micro-Ohm - +- max-expected-current + Max expected current value in mA Example: ina220@44 { compatible = "ti,ina220"; reg = <0x44>; shunt-resistor = <1000>; + max-expected-current = <3000>; }; diff --git a/Documentation/hwmon/ina2xx b/Documentation/hwmon/ina2xx index cfd31d9..e9ca838 100644 --- a/Documentation/hwmon/ina2xx +++ b/Documentation/hwmon/ina2xx @@ -51,10 +51,11 @@ INA230 and INA231 are high or low side current shunt and power monitors with an I2C interface. The chips monitor both a shunt voltage drop and bus supply voltage. -The shunt value in micro-ohms can be set via platform data or device tree at -compile-time or via the shunt_resistor attribute in sysfs at run-time. Please -refer to the Documentation/devicetree/bindings/i2c/ina2xx.txt for bindings -if the device tree is used. +The shunt value in micro-ohms and max expected current in mA can be set +via platform data or device tree at compile-time or via the shunt_resistor +and max_expected_current attributes in sysfs at run-time. Please refer to the +Documentation/devicetree/bindings/i2c/ina2xx.txt for bindings if the +device tree is used. Additionally ina226 supports update_interval attribute as described in Documentation/hwmon/sysfs-interface. Internally the interval is the sum of