From patchwork Thu Oct 12 12:36:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maciej Purski X-Patchwork-Id: 10001837 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 3D12E603B5 for ; Thu, 12 Oct 2017 12:36:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FE7B28DB7 for ; Thu, 12 Oct 2017 12:36:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 248E428DB8; Thu, 12 Oct 2017 12:36:50 +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=ham 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 A8EAC28DB6 for ; Thu, 12 Oct 2017 12:36:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756875AbdJLMgp (ORCPT ); Thu, 12 Oct 2017 08:36:45 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:51773 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752765AbdJLMgi (ORCPT ); Thu, 12 Oct 2017 08:36:38 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20171012123636euoutp0134d0b506ea14b9ce1771f1397afe9ec7~s0tcfUyJV3176331763euoutp01o; Thu, 12 Oct 2017 12:36:36 +0000 (GMT) Received: from eusmges3.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20171012123635eucas1p1cf79e3639be7750748932bb8d54856a2~s0tb1g0XA0133301333eucas1p1-; Thu, 12 Oct 2017 12:36:35 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3.samsung.com (EUCPMTA) with SMTP id AE.22.12867.3D16FD95; Thu, 12 Oct 2017 13:36:35 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20171012123635eucas1p1ff9a982db9d541cd0475d44d114ff92a~s0tbL_l-I0133201332eucas1p1b; Thu, 12 Oct 2017 12:36:35 +0000 (GMT) X-AuditID: cbfec7f2-f793b6d000003243-6b-59df61d3850a Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id D4.5A.18832.3D16FD95; Thu, 12 Oct 2017 13:36:35 +0100 (BST) Received: from AMDC2075.DIGITAL.local ([106.120.51.25]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OXP00DU9N0HRK20@eusync4.samsung.com>; Thu, 12 Oct 2017 13:36:35 +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 v2 3/4] dt-bindings: hwmon: Add ti-max-expected-current-microamp property to ina2xx Date: Thu, 12 Oct 2017 14:36:04 +0200 Message-id: <1507811765-31005-4-git-send-email-m.purski@samsung.com> X-Mailer: git-send-email 2.7.4 In-reply-to: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= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFLMWRmVeSWpSXmKPExsVy+t/xa7qXE+9HGlycz2uxccZ6VosnB9oZ LeYfOcdqcXZCoMWDplVMFv2PXzNb7Pr/htni/PkN7BZLJs9ntdj0+BqrxcK2JSwW7a+3MlrM O/KOxWLG+X1MFoem7mW0eLLwDJPFgpe3WCzWHrnLbrH0+kUmi9+7jrFbtO49wu4g6rFm3hpG j8vXLjJ7fPgY57FpVSebx+Yl9R6L+yazeix5c4jV43zzEUaPnd8b2D36tqxi9Fi/5SqLx+dN cgE8UVw2Kak5mWWpRfp2CVwZ589tYSn4y1tx9P9m5gbGm9xdjJwcEgImEksP/2CHsMUkLtxb z9bFyMUhJLCEUaL72H8op5FJ4v63V8xdjBwcbAJaEmva40HiIgL7GCVOP57LCOIwC1xkkTiz Zx0LyChhgVSJp28ms4LYLAKqEr+W94Gt4BVwkZj2uYUJYp2cxM1zncwgNqeAq8SKxbfB6oWA alovrmWcwMi7gJFhFaNIamlxbnpusaFecWJucWleul5yfu4mRmCMbDv2c/MOxksbgw8xCnAw KvHw3vh7L1KINbGsuDL3EKMEB7OSCO/5uPuRQrwpiZVVqUX58UWlOanFhxilOViUxHl796yO FBJITyxJzU5NLUgtgskycXBKNTA6TltiFMNh8PXEv2rpo/mLs1IsTCrWHT7Vv1NlYYbQEb9P M6I5nRmuT44Qbpv4bfYXyR3S7X8ez7xZl2nyfp7PrNMX7nCosk3RZOvc+eqymgiLqny6oB7D 5MfWyeqd1WFBIscErsm9MJeZuvbTh1n33IWdi+UYLuen7w+7JnxxZn/A9ByGHmUlluKMREMt 5qLiRACaZ/HsjQIAAA== X-CMS-MailID: 20171012123635eucas1p1ff9a982db9d541cd0475d44d114ff92a 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: 20171012123635eucas1p1ff9a982db9d541cd0475d44d114ff92a X-RootMTR: 20171012123635eucas1p1ff9a982db9d541cd0475d44d114ff92a References: <1507811765-31005-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 measure scale. Document the changes in Documentation/hwmon/ina2xx. Signed-off-by: Maciej Purski --- Documentation/devicetree/bindings/hwmon/ina2xx.txt | 4 +++- Documentation/hwmon/ina2xx | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/hwmon/ina2xx.txt b/Documentation/devicetree/bindings/hwmon/ina2xx.txt index 02af0d9..49ef0be 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 - +- ti-max-expected-current-microamp + Max expected current value in mA Example: ina220@44 { compatible = "ti,ina220"; reg = <0x44>; shunt-resistor = <1000>; + ti-max-expected-current-microamp = <3000>; }; diff --git a/Documentation/hwmon/ina2xx b/Documentation/hwmon/ina2xx index cfd31d9..30620e8 100644 --- a/Documentation/hwmon/ina2xx +++ b/Documentation/hwmon/ina2xx @@ -55,6 +55,9 @@ 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 max expected current value in miliamp can be set via platform data +or device tree at compile-time or via currX_max attribute in sysfs +at run-time. Additionally ina226 supports update_interval attribute as described in Documentation/hwmon/sysfs-interface. Internally the interval is the sum of