From: Fabio Estevam festevam@denx.de
The IIO core emits warnings when a scan mask is a subset of a previous one in the available_scan_masks array.
In the current max11607_mode_list[], the s0to3 mode (channels 0–3, mask 0xF) precedes the s2to3 mode (channels 2–3, mask 0xC). Since 0xC is a subset of 0xF, the following warning is triggered:
max1363 1-0064: Mask 7 (0xc) is a subset of mask 6 (0xf) and will be ignored
Reordering the max11607_mode_list[] to place s0to3 after s2to3 ensures that more specific scan modes are listed before broader ones, preventing such warnings.
This change improves clarity and avoids unnecessary warnings during device initialization.
Cc: stable@vger.kernel.org Fixes: 2718f15403fb ("iio: sanity check available_scan_masks array") Signed-off-by: Fabio Estevam festevam@denx.de --- drivers/iio/adc/max1363.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/max1363.c b/drivers/iio/adc/max1363.c index d0c6e94f7204..e8eeb00bef7b 100644 --- a/drivers/iio/adc/max1363.c +++ b/drivers/iio/adc/max1363.c @@ -577,8 +577,8 @@ static const struct iio_chan_spec max1238_channels[] = MAX1363_12X_CHANS(12);
static const enum max1363_modes max11607_mode_list[] = { _s0, _s1, _s2, _s3, - s0to1, s0to2, s0to3, - s2to3, + s0to1, s0to2, s2to3, + s0to3, d0m1, d2m3, d1m0, d3m2, d0m1to2m3, d1m0to3m2, };