From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Neil Armstrong <neil.armstrong@linaro.org>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org,
linux@analog.com
Subject: Re: [PATCH v7 3/3] iio: adc: add driver for the MAX34417 Four-Channel High Dynamic Range Power Accumulator
Date: Tue, 24 Nov 2026 11:47:36 +0200 [thread overview]
Message-ID: <awVdOHLZJqnY2NIB@ashevche-desk.local> (raw)
In-Reply-To: <3f0bf2dc-02c4-45e8-ae06-feb669b6b234@linaro.org>
On Tue, Nov 24, 2026 at 10:30:52AM +0100, Neil Armstrong wrote:
> On 11/23/26 20:39, Andy Shevchenko wrote:
> > On Mon, Nov 23, 2026 at 06:47:46PM +0100, Neil Armstrong wrote:
...
> > > +#define MAX34417_MIN_RSENSE_UOHM (1 * MILLI)
> > > +#define MAX34417_MAX_RSENSE_UOHM (100 * MILLI)
> > > +#define MAX34417_DEFAULT_RSENSE_UOHM (1 * MILLI)
> >
> > Oh, it's micro, but you use MILLI. Also even in macros we nowadays want to see
> > the unit as defined in SI.
> >
> > #define MAX34417_MIN_RSENSE_uOhm (1 * (MICRO / MILLI))
> > #define MAX34417_MAX_RSENSE_uOhm (100 * (MICRO / MILLI))
> > #define MAX34417_DEFAULT_RSENSE_uOhm (1 * (MICRO / MILLI))
> >
> > Alternatively add another patch to start Ohm multipliers in units.h
> >
> > #define MICROOHM_PER_MILLIOHM 1000
> >
> > I will Ack it.
>
> Hmm, I want to express the min/max/default rsense in uOhm, minimum is 1000 uOhm,
> max is 100000 uOhm, so initially they were:
> #define MAX34417_MIN_RSENSE (1000)
> #define MAX34417_MAX_RSENSE (100000)
>
> and the unit is uOhm, so how should I define them ?
>
> with #define MICROOHM_PER_MILLIOHM 1000
>
> #define MAX34417_MIN_RSENSE_uOhm (1 * MICROOHM_PER_MILLIOHM)
> #define MAX34417_MAX_RSENSE_uOhm (100 * MICROOHM_PER_MILLIOHM)
>
> ?
Yes, precisely!
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-11-24 10:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 17:47 [PATCH v7 0/3] iio: adc: add support " Neil Armstrong
2026-11-23 17:47 ` [PATCH v7 1/3] dt-bindings: iio: add: document " Neil Armstrong
2026-11-23 17:47 ` [PATCH v7 2/3] unaligned: introduce be56 unaligned accessors Neil Armstrong
2026-11-23 17:47 ` [PATCH v7 3/3] iio: adc: add driver for the MAX34417 Four-Channel High Dynamic Range Power Accumulator Neil Armstrong
2026-11-23 19:39 ` Andy Shevchenko
2026-11-24 9:30 ` Neil Armstrong
2026-11-24 9:47 ` Andy Shevchenko [this message]
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=awVdOHLZJqnY2NIB@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@analog.com \
--cc=neil.armstrong@linaro.org \
--cc=nuno.sa@analog.com \
--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
all inboxes | Powered by JetHome®