From: Siratul Islam <siratul.islam@linux.dev>
To: Stefan Popa <stefan.popa@analog.com>
Cc: linux-hwmon@vger.kernel.org, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
jic23@kernel.org, andy@kernel.org, nuno.sa@analog.com,
linux@roeck-us.net, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, dlechner@baylibre.com,
ciprian.hegbeli@analog.com, u.kleine-koenig@baylibre.com,
joshua.crofts1@gmail.com
Subject: Re: [PATCH v6 2/2] iio: adc: add MAX40080 current-sense amplifier driver
Date: Fri, 31 Jul 2026 12:00:06 +0600 [thread overview]
Message-ID: <df3edbd24fe35ba8897efefa0af69c58ffc1a39d.camel@linux.dev> (raw)
In-Reply-To: <20260730131738.822405-3-stefan.popa@analog.com>
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.
>
...
> +
> +#define MAX40080_REG_FIFO_CFG 0x0A
> +#define 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 MAX40080_IV_I_MSK GENMASK(12, 0)
> +#define MAX40080_IV_I_SIGN_BIT 12
> +#define MAX40080_IV_V_MAG_MSK GENMASK(27, 16)
> +#define 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
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 (linux-iio@vger.kernel.org).
Send to maintainers and Cc reviewers and lists.
--
Best regards,
Sirat
prev parent reply other threads:[~2026-07-31 6:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 13:17 [PATCH v6 0/2] iio: adc: add MAX40080 current-sense amplifier driver Stefan Popa
2026-07-30 13:17 ` [PATCH v6 1/2] dt-bindings: iio: adc: add adi,max40080 Stefan Popa
2026-07-30 13:25 ` sashiko-bot
2026-07-30 18:42 ` Siratul Islam
2026-07-31 7:04 ` Krzysztof Kozlowski
2026-07-31 7:06 ` Krzysztof Kozlowski
2026-07-30 13:17 ` [PATCH v6 2/2] iio: adc: add MAX40080 current-sense amplifier driver Stefan Popa
2026-07-30 13:29 ` sashiko-bot
2026-07-31 6:00 ` Siratul Islam [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=df3edbd24fe35ba8897efefa0af69c58ffc1a39d.camel@linux.dev \
--to=siratul.islam@linux.dev \
--cc=andy@kernel.org \
--cc=ciprian.hegbeli@analog.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=joshua.crofts1@gmail.com \
--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@roeck-us.net \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=stefan.popa@analog.com \
--cc=u.kleine-koenig@baylibre.com \
/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