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

Siratul Islam <[email protected]> Fri, 31 Jul 2026 12:00:06 +0600
Newsgroups org.kernel.vger.linux-hwmon,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Thu, 2026-07-30 at 16:17 +0300, Stefan Popa wrote:
> The MAX40080 is 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,
> storing the results in an internal FIFO.
>=20
...
> +
> +#define MAX40080_REG_FIFO_CFG		0x0A
> +#define=C2=A0 MAX40080_FIFO_CFG_STORE_IV_MSK	GENMASK(1, 0)
> +
> +#define MAX40080_REG_IV			0x10
> +/* Current is a 13-bit two's-complement value (magnitude + sign bit). */
> +#define=C2=A0 MAX40080_IV_I_MSK		GENMASK(12, 0)
> +#define=C2=A0 MAX40080_IV_I_SIGN_BIT		12
> +#define=C2=A0 MAX40080_IV_V_MAG_MSK		GENMASK(27, 16)
> +#define=C2=A0 MAX40080_IV_VALID_MSK		BIT(31)
> +
> +/* CFG.mode field values. */
> +#define MAX40080_CFG_MODE_STDBY		0x00
> +#define MAX40080_CFG_MODE_SINGLE	0x02
> +
> +/* CFG.range field values. */
> +#define MAX40080_CFG_RANGE_50MV		0
> +#define MAX40080_CFG_RANGE_10MV		1
this and other "MV"s below should be mV(m lowercase) as=C2=A0
I suggested in the previous version.
> +
> +/* FIFO_CFG.store_iv field values. */
> +#define MAX40080_FIFO_CFG_STORE_I_V	0x02
I also had a question on why this is I_V and not IV like the rest of them?
> +
> +#define MAX40080_ADC_RES_BITS		12
> +#define MAX40080_INTER_VREF_MV		1250
> +#define MAX40080_V_BUFF_GAIN		30
> +#define MAX40080_CSA_50MV_GAIN		25
> +#define MAX40080_CSA_10MV_GAIN		125
...
Looks like you missed some of the reviews. If it was intentional,
please acknowledge that. It is a good idea to reply to emails
and discuss/confirm stuff before sending a new patch.

Also avoid sending --to mailing lists ([email protected]).=C2=A0
Send to maintainers and Cc reviewers and lists.

--
Best regards,
Sirat