Re: [PATCH v2 0/2] iio: adc: add MAX40080 current-sense amplifier driver

From: Joshua Crofts

Date: Mon Jul 13 2026 - 08:27:42 EST


On Mon, 13 Jul 2026 15:02:24 +0300
Stefan Popa <stefan.popa@xxxxxxxxxx> wrote:

> This series adds support for the Maxim MAX40080, a bidirectional
> current-sense amplifier with an integrated 12-bit ADC and an I2C/SMBus
> interface. It measures the voltage across an external shunt resistor and
> the input bus voltage.
>
> Why a new driver (Andy): No existing IIO driver covers this device or a
> register-compatible part. The closest relatives (max9611, max34408) target
> different silicon with incompatible register maps. The MAX40080 has a
> unique combination of bidirectional 13-bit current, 64-entry FIFO, mandatory
> PEC, single-measurement mode triggered by SMBus Quick Command, and two
> selectable input ranges. See the driver commit message for the full
> rationale.
>
> The datasheet link is in the binding YAML description.
>
> The driver operates in direct (INDIO_DIRECT_MODE) mode. Each raw read
> triggers a single on-demand conversion (SMBus Quick Command) and reads
> back the matched current/voltage pair, so results are always fresh. It
> exposes the current and voltage channels with raw and scale attributes,
> a configurable oversampling (digital averaging) ratio, and PEC-protected
> register access. The two selectable current-sense ranges are exposed
> through scale/scale_available (the range is chosen by writing the
> desired scale); the current scale is derived from the
> shunt-resistor-micro-ohms device-tree property.
>
> Continuous FIFO buffering, threshold events and the alert interrupt are
> intentionally left out of this initial submission and may be added
> later.
>
> Tested on hardware with four MAX40080 devices on an I2C bus.
>
> Changes in v2:

Please don't send a new version as a reply to the previous version, it
breaks people's workflow and tooling! (tools like b4 may get confused
by this).

--
Kind regards

CJD