Re: [PATCH v4 01/13] iio: adc: ad4134: Adjust register map range
From: Nuno Sá
Date: Wed Oct 14 2026 - 12:55:45 EST
On Tue, 06 Oct 2026 15:16:06 -0300, Marcelo Schmitt <marcelo.schmitt@xxxxxxxxxx> wrote:
> diff --git a/drivers/iio/adc/ad4134.c b/drivers/iio/adc/ad4134.c
> index 70f80bf1825f..e53c10b9a44a 100644
> --- a/drivers/iio/adc/ad4134.c
> +++ b/drivers/iio/adc/ad4134.c
> @@ -244,7 +244,7 @@ static const struct regmap_config ad4134_regmap_config = {
> .reg_write = ad4134_reg_write,
> .rd_table = &ad4134_regmap_rd_table,
> .wr_table = &ad4134_regmap_wr_table,
> - .max_register = AD4134_CH_VREG(ARRAY_SIZE(ad4134_chan_set)),
> + .max_register = AD4134_CH_VREG(ARRAY_SIZE(ad4134_chan_set) - 1),
Can't we just use AD4134_NUM_CHANNELS? sashiko seems to have a point in
the othe patch comment.
- Nuno Sá
--
Nuno Sá <nuno.sa@xxxxxxxxxx>