]> git.ipfire.org Git - thirdparty/linux.git/commit
iio: adc: max1363: Reorder mode_list[] entries
authorFabio Estevam <festevam@denx.de>
Fri, 16 May 2025 17:39:00 +0000 (14:39 -0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 9 Jun 2025 06:45:19 +0000 (07:45 +0100)
commit8d8d7c1dbc46aa07a76acab7336a42ddd900be10
treeb7c971a1bede37f0f83c3c7ec226a8ecb2bfeb3d
parent6d21f2c2dd843bceefd9455f2919f6bb526797f0
iio: adc: max1363: Reorder mode_list[] entries

The IIO core issues warnings when a scan mask is a subset of a previous
entry in the available_scan_masks array.

On a board using a MAX11601, the following warning is observed:

max1363 1-0064: available_scan_mask 7 subset of 6. Never used

This occurs because the entries in the max11607_mode_list[] array are not
ordered correctly. To fix this, reorder the entries so that no scan mask is
a subset of an earlier one.

While at it, reorder the mode_list[] arrays for other supported chips as
well, to prevent similar warnings on different variants.

Note fixes tag dropped as these were introduced over many commits a long
time back and the side effect until recently was a reduction in sampling
rate due to reading too many channels when only a few were desired.
Now we have a sanity check that reports this error but that is not
where the issue was introduced.

Cc: stable@vger.kernel.org
Signed-off-by: Fabio Estevam <festevam@denx.de>
Acked-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://patch.msgid.link/20250516173900.677821-2-festevam@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/max1363.c