Re: [PATCH v4 3/3] iio: adc: add driver for the MAX34417 Four-Channel High Dynamic Range Power Accumulator

From: Jonathan Cameron

Date: Sat Oct 31 2026 - 22:08:05 EST


On Wed, 28 Oct 2026 14:19:06 +0100
Neil Armstrong <neil.armstrong@xxxxxxxxxx> wrote:

> The MAX34417 is a specialized current and voltage monitor used to
> determine power consumption of portable systems. The driver support
> getting the channels voltage, average power, 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 mJ.
>
> 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.
>
> Signed-off-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx>

FWIW I took another look and don't have anything to add to the
comments of others. With those tidied up hopefully this will
be ready to merge.

thanks,

Jonathan