From: Jonathan Cameron <jic23@kernel.org>
To: Neil Armstrong <neil.armstrong@linaro.org>
Cc: "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>,
"Jonathan Corbet" <corbet@lwn.net>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"Randy Dunlap" <rdunlap@infradead.org>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux@analog.com,
linux-doc@vger.kernel.org,
"Conor Dooley" <conor.dooley@microchip.com>,
"Marius Cristea" <marius.cristea@microchip.com>,
"Andy Shevchenko" <andriy.shevchenko@intel.com>
Subject: Re: [PATCH v8 0/5] iio: adc: add support for the MAX34417 Four-Channel High Dynamic Range Power Accumulator
Date: Sat, 5 Dec 2026 22:42:20 +0000 [thread overview]
Message-ID: <20261205224220.26f7fed2@jic23-hlaptop> (raw)
In-Reply-To: <20261130-topic-sm8x50-iio-max34417-adc-v8-0-6efef2782816@linaro.org>
On Mon, 30 Nov 2026 17:30:34 +0100
Neil Armstrong <neil.armstrong@linaro.org> wrote:
> The MAX34417 is a specialized current and voltage monitor used to
> determine power consumption of portable systems. The driver supports
> getting the channels voltage, average power and accumulated average
> power and energy over an I2C/SMBUS serial interface.
>
> The MAX34417 datasheet only specified on how to calculate the
> accumulated average power, but with the Sample Per Second rate
> we can easily get accumulated Energy in Joules.
>
> By default the IIO driver only supports single-shot Voltage
> and Power sensing, but the accumulation can be enabled by
> enabling the Energy IIO channel which then enables the
> Continuous Accumulation Mode.
>
> The counter is common to all channels, so when reading a single
> channel we will copy all accumulators to registers, so in order
> to permit reading individual channels we must accumulate the
> other channels in the driver when Continuous Accumulation Mode
> is enabled.
>
> The get_unaligned_be56() helper is added since we effectly
> get an unaligned 56bit value from the HW.
>
> While Analog Devices originally provided an HWMON driver for this
> IC, using IIO makes much more sense because it provides
> much more flexibility to support getting the power values
> and will make it easier to support trigger to dump all
> channels in a single shot and then support the Bulk Update
> feature to update all MAX34417 on the same bus via the
> trigger mechanism.
>
> The v3 implementation has been completely revised since
> v1/v2 to better match the capabilities of the MAX34417.
>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Applied to the testing branch of iio.git, so lined up for next merge
window. Make sure to check out the minor things Sashiko called out
and send patches on top if they makes sense,
Thanks,
Jonathan
prev parent reply other threads:[~2026-12-05 22:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 16:30 [PATCH v8 0/5] iio: adc: add support for the MAX34417 Four-Channel High Dynamic Range Power Accumulator Neil Armstrong
2026-11-30 16:30 ` [PATCH v8 1/5] dt-bindings: iio: add: document " Neil Armstrong
2026-11-30 16:30 ` [PATCH v8 2/5] unaligned: introduce be56 unaligned accessors Neil Armstrong
2026-11-30 16:30 ` [PATCH v8 3/5] units: Add MICROOHM_PER_MILLIOHM Neil Armstrong
2026-11-30 17:29 ` Andy Shevchenko
2026-11-30 16:30 ` [PATCH v8 4/5] iio: adc: add driver for the MAX34417 Four-Channel High Dynamic Range Power Accumulator Neil Armstrong
2026-11-30 16:43 ` sashiko-bot
2026-11-30 16:50 ` Neil Armstrong
2026-12-05 22:39 ` Jonathan Cameron
2026-11-30 16:30 ` [PATCH v8 5/5] docs: iio: add documentation for MAX34417 driver Neil Armstrong
2026-12-05 22:42 ` Jonathan Cameron [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=20261205224220.26f7fed2@jic23-hlaptop \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=conor.dooley@microchip.com \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@analog.com \
--cc=marius.cristea@microchip.com \
--cc=neil.armstrong@linaro.org \
--cc=nuno.sa@analog.com \
--cc=rdunlap@infradead.org \
--cc=robh@kernel.org \
--cc=skhan@linuxfoundation.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