From patchwork Thu Oct 12 13:18:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maciej Purski X-Patchwork-Id: 10001929 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 A57806028A for ; Thu, 12 Oct 2017 13:18:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 975D828DC7 for ; Thu, 12 Oct 2017 13:18:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B1D028DC9; Thu, 12 Oct 2017 13:18:34 +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 3B07228DCB for ; Thu, 12 Oct 2017 13:18:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757335AbdJLNS1 (ORCPT ); Thu, 12 Oct 2017 09:18:27 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:57270 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753375AbdJLNSU (ORCPT ); Thu, 12 Oct 2017 09:18:20 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20171012131818euoutp0143d45e6dbd60a6eeb16cf1e5e0d8c54f~s1R2QB3Tl1070310703euoutp01d; Thu, 12 Oct 2017 13:18:18 +0000 (GMT) Received: from eusmges5.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20171012131817eucas1p2f6dbf85c53864743540238a480e4e879~s1R1lgHhr1485514855eucas1p2P; Thu, 12 Oct 2017 13:18:17 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges5.samsung.com (EUCPMTA) with SMTP id 8E.DE.12743.99B6FD95; Thu, 12 Oct 2017 14:18:17 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20171012131816eucas1p292bc0e20f141cfd21fe27c40700d82fb~s1R04B3lp1916919169eucas1p28; Thu, 12 Oct 2017 13:18:16 +0000 (GMT) X-AuditID: cbfec7f5-f79d06d0000031c7-ae-59df6b997904 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 48.93.20118.89B6FD95; Thu, 12 Oct 2017 14:18:16 +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 <0OXP0071YOY5COB0@eusync4.samsung.com>; Thu, 12 Oct 2017 14:18:16 +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 v3 3/4] dt-bindings: hwmon: Add ti-max-expected-current-milliamp property to ina2xx Date: Thu, 12 Oct 2017 15:18:01 +0200 Message-id: <1507814282-1486-4-git-send-email-m.purski@samsung.com> X-Mailer: git-send-email 2.7.4 In-reply-to: <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brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJLMWRmVeSWpSXmKPExsVy+t/xa7ozsu9HGnzq0LbYOGM9q8WTA+2M FvOPnGO1ODsh0OJB0yomi/7Hr5ktdv1/w2xx/vwGdoslk+ezWmx6fI3VYmHbEhaL9tdbGS3m HXnHYjHj/D4mi0NT9zJaPFl4hsliwctbLBZrj9xlt1h6/SKTxe9dx9gtWvceYXcQ9Vgzbw2j x+VrF5k9PnyM89i0qpPNY/OSeo/FfZNZPZa8OcTqcb75CKPHzu8N7B59W1YxeqzfcpXF4/Mm uQCeKC6blNSczLLUIn27BK6ML5dXsBT85a34PLmdvYHxJncXIyeHhICJxLpXL5ghbDGJC/fW s3UxcnEICSxhlOg/cIkZwmlkkni+/g97FyMHB5uAlsSa9niQuIjAPkaJ04/nMoI4zAIXWSTO 7FnHAjJKWCBV4tHU+0wgNouAqkRb319GEJtXwFmi7ewPRoh1chI3z3UygwzlFHCR+DjJAiQs BFLyuIN1AiPvAkaGVYwiqaXFuem5xUZ6xYm5xaV56XrJ+bmbGIERsu3Yzy07GLveBR9iFOBg VOLhtWS/HynEmlhWXJl7iFGCg1lJhNc3AyjEm5JYWZValB9fVJqTWnyIUZqDRUmct3fP6kgh gfTEktTs1NSC1CKYLBMHp1QDo3z8Rcd7iu1xXHdVGNa59fZLSthsvzolW+LZV4uFUW7ymm2f 8x3uySht3h+WvLy3x75UJm//opzDK7W4mEr7QpJ/eXVeO/bTMeFF+by7084quE485Ny0eLfq J7tU793x66dUbO48+a37s12octGLiQGL7vUb3fT+7X1orfK7Gd/kJfOc1fKSlFiKMxINtZiL ihMBYfiGPIwCAAA= X-CMS-MailID: 20171012131816eucas1p292bc0e20f141cfd21fe27c40700d82fb X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 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: 20171012131816eucas1p292bc0e20f141cfd21fe27c40700d82fb X-RootMTR: 20171012131816eucas1p292bc0e20f141cfd21fe27c40700d82fb References: <1507814282-1486-1-git-send-email-m.purski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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..9268595 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-milliamp + Max expected current value in mA Example: ina220@44 { compatible = "ti,ina220"; reg = <0x44>; shunt-resistor = <1000>; + ti-max-expected-current-milliamp = <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