From: Guenter Roeck <linux@roeck-us.net>
To: Rob Herring <robh@kernel.org>
Cc: Maciej Purski <m.purski@samsung.com>,
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,
Mark Rutland <mark.rutland@arm.com>,
Jean Delvare <jdelvare@suse.com>,
Jonathan Corbet <corbet@lwn.net>,
Russell King <linux@armlinux.org.uk>,
Kukjin Kim <kgene@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Jonathan Cameron <jic23@kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH v2 3/4] dt-bindings: hwmon: Add ti-max-expected-current-microamp property to ina2xx
Date: Tue, 17 Oct 2017 13:58:21 -0700 [thread overview]
Message-ID: <20171017205821.GA8737@roeck-us.net> (raw)
In-Reply-To: <20171017203631.xaut7o3szaiucnqh@rob-hp-laptop>
On Tue, Oct 17, 2017 at 03:36:31PM -0500, Rob Herring wrote:
> On Thu, Oct 12, 2017 at 02:36:04PM +0200, Maciej Purski wrote:
> > 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 <m.purski@samsung.com>
> > ---
> > 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
>
> ti,max-...
>
> The property name is a bit long. Does "expected" add anything? Is there
> a max unexpected current?
>
I am not too happy with it either. To me it suggests that there _can_ be
an unexpected current (why specify a max _expected_ current otherwise ?),
and that unexpected current won't be measurable and thus not reported
because it is ... well, unexpected.
Guenter
> > 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
> > --
> > 2.7.4
> >
next prev parent reply other threads:[~2017-10-17 20:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20171012123623eucas1p18dd41d52069240a3172c0bcec8f63553@eucas1p1.samsung.com>
2017-10-12 12:36 ` [PATCH v2 0/4] Make max expected current configurable for ina2xx drivers Maciej Purski
[not found] ` <CGME20171012123632eucas1p1638754631a455ec6ff5f9770f6c33a95@eucas1p1.samsung.com>
2017-10-12 12:36 ` [PATCH v2 1/4] iio: adc: ina2xx: Make max expected current configurable Maciej Purski
[not found] ` <CGME20171012123633eucas1p2b76006dfc295beab89de68cbfe8839ad@eucas1p2.samsung.com>
2017-10-12 12:36 ` [PATCH v2 2/4] hwmon: (ina2xx) " Maciej Purski
[not found] ` <CGME20171012123635eucas1p1ff9a982db9d541cd0475d44d114ff92a@eucas1p1.samsung.com>
2017-10-12 12:36 ` [PATCH v2 3/4] dt-bindings: hwmon: Add ti-max-expected-current-microamp property to ina2xx Maciej Purski
2017-10-12 12:39 ` Krzysztof Kozlowski
[not found] ` <CAJKOXPc1B1uqravtmHrh4eUK5JiQRiZLeoveSMk5qVyF-mK7Kw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-12 13:00 ` Maciej Purski
2017-10-12 13:55 ` Guenter Roeck
[not found] ` <79da3a8b-e885-8a02-cbba-dfd1834450db-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2017-10-12 14:13 ` Maciej Purski
2017-10-17 20:36 ` Rob Herring
2017-10-17 20:58 ` Guenter Roeck [this message]
2017-10-18 8:12 ` Jonathan Cameron
[not found] ` <CGME20171012123642eucas1p2878b47147404d6699eb92f9316f7c1b5@eucas1p2.samsung.com>
[not found] ` <1507811765-31005-1-git-send-email-m.purski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2017-10-12 12:36 ` [PATCH v2 4/4] ARM: dts: Add ti-max-expected-current-microamp properties for ina231 in Odroid XU3 Maciej Purski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171017205821.GA8737@roeck-us.net \
--to=linux@roeck-us.net \
--cc=b.zolnierkie@samsung.com \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=jdelvare@suse.com \
--cc=jic23@kernel.org \
--cc=kgene@kernel.org \
--cc=knaack.h@gmx.de \
--cc=krzk@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=m.purski@samsung.com \
--cc=m.szyprowski@samsung.com \
--cc=mark.rutland@arm.com \
--cc=pmeerw@pmeerw.net \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).