Linux IIO development
 help / color / mirror / Atom feed
From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Fabio Estevam <festevam@gmail.com>, jic23@kernel.org
Cc: linux-iio@vger.kernel.org, Fabio Estevam <festevam@denx.de>,
	stable@vger.kernel.org
Subject: Re: [PATCH v3 1/2] iio: adc: max1363: Fix MAX1363_4X_CHANS/MAX1363_8X_CHANS[]
Date: Mon, 26 May 2025 09:34:51 +0300	[thread overview]
Message-ID: <4e058703-0d2e-4d98-864a-2e12af44a580@gmail.com> (raw)
In-Reply-To: <20250525115546.2368007-1-festevam@gmail.com>

On 25/05/2025 14:55, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
> 
> Since commit 2718f15403fb ("iio: sanity check available_scan_masks array"),
> booting a board populated with a MAX11601 results in a flood of warnings:
> 
> max1363 1-0064: available_scan_mask 8 subset of 0. Never used
> max1363 1-0064: available_scan_mask 9 subset of 0. Never used
> max1363 1-0064: available_scan_mask 10 subset of 0. Never used
> max1363 1-0064: available_scan_mask 11 subset of 0. Never used
> max1363 1-0064: available_scan_mask 12 subset of 0. Never used
> max1363 1-0064: available_scan_mask 13 subset of 0. Never used
> ...
> 
> These warnings are caused by incorrect offsets used for differential
> channels in the MAX1363_4X_CHANS() and MAX1363_8X_CHANS() macros.
> 
> The max1363_mode_table[] defines the differential channel mappings as
> follows:
> 
> MAX1363_MODE_DIFF_SINGLE(0, 1, 1 << 12),
> MAX1363_MODE_DIFF_SINGLE(2, 3, 1 << 13),
> MAX1363_MODE_DIFF_SINGLE(4, 5, 1 << 14),
> MAX1363_MODE_DIFF_SINGLE(6, 7, 1 << 15),
> MAX1363_MODE_DIFF_SINGLE(8, 9, 1 << 16),
> MAX1363_MODE_DIFF_SINGLE(10, 11, 1 << 17),
> MAX1363_MODE_DIFF_SINGLE(1, 0, 1 << 18),
> MAX1363_MODE_DIFF_SINGLE(3, 2, 1 << 19),
> MAX1363_MODE_DIFF_SINGLE(5, 4, 1 << 20),
> MAX1363_MODE_DIFF_SINGLE(7, 6, 1 << 21),
> MAX1363_MODE_DIFF_SINGLE(9, 8, 1 << 22),
> MAX1363_MODE_DIFF_SINGLE(11, 10, 1 << 23),
> 
> Update the macros to follow this same pattern, ensuring that the scan masks
> are valid and preventing the warnings.
> 
> Cc: <stable@vger.kernel.org> #6.12
> Suggested-by: Jonathan Cameron <jic23@kernel.org>
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
> Changes since v2:
> - Removed incorrect Fixes: tag (Matti)

This looks good to me now. I won't give an RB-tag as reviewing a change 
like this would really require me to go through the data-sheets for 
these devices to understand the channel configs - and I haven't done it. 
If 'acked-by' can be translated as "In principle, and without deep dive 
into the details, the change looks like a right thing to do" - then feel 
free to add:
Acked-by: Matti Vaittinen <mazziesaccount@gmail.com>
although, coming from a non maintainer/reviewer, I suppose it isn't 
worth much :) Anyways, my comments are fully met :)

Yours,
	-- Matti

      parent reply	other threads:[~2025-05-26  6:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-25 11:55 [PATCH v3 1/2] iio: adc: max1363: Fix MAX1363_4X_CHANS/MAX1363_8X_CHANS[] Fabio Estevam
2025-05-25 11:55 ` [PATCH v3 2/2] iio: adc: max1363: Reorder mode_list[] entries Fabio Estevam
2025-05-25 13:17 ` [PATCH v3 1/2] iio: adc: max1363: Fix MAX1363_4X_CHANS/MAX1363_8X_CHANS[] Jonathan Cameron
2025-05-26  6:34 ` Matti Vaittinen [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=4e058703-0d2e-4d98-864a-2e12af44a580@gmail.com \
    --to=mazziesaccount@gmail.com \
    --cc=festevam@denx.de \
    --cc=festevam@gmail.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /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