On Tue, 2024-07-02 at 17:34 +0000, Guillaume Stols wrote: > gpiod_set_array_value was misused here: the implementation relied on the > assumption that an unsigned long was required for each gpio, while the > function expects a bit array stored in "as much unsigned long as needed > for storing one bit per GPIO", i.e it is using a bit field. > > This leaded to incorrect parameter passed to gpiod_set_array_value, that > would set 1 value instead of 3. > It also prevents to select the software mode correctly for the AD7606B. > > Fixes: d2a415c86c6b ("iio: adc: ad7606: Add support for AD7606B ADC") > Fixes: 41f71e5e7daf ("staging: iio: adc: ad7606: Use find_closest() macro") > Signed-off-by: Guillaume Stols <gstols@xxxxxxxxxxxx> > --- Reviewed-by: Nuno Sa <nuno.sa@xxxxxxxxxx>