values[0] = val & GENMASK(2, 0);
- gpiod_set_array_value(st->gpio_os->ndescs, st->gpio_os->desc,
- st->gpio_os->info, values);
+ gpiod_multi_set_value_cansleep(st->gpio_os, values);
/* AD7616 requires a reset to update value */
if (st->chip_info->os_req_reset)
* in the device tree, then they need to be set to high,
* otherwise, they must be hardwired to VDD
*/
- if (st->gpio_os) {
- gpiod_set_array_value(st->gpio_os->ndescs, st->gpio_os->desc,
- st->gpio_os->info, os);
- }
+ if (st->gpio_os)
+ gpiod_multi_set_value_cansleep(st->gpio_os, os);
+
/* OS of 128 and 256 are available only in software mode */
st->oversampling_avail = ad7606b_oversampling_avail;
st->num_os_ratios = ARRAY_SIZE(ad7606b_oversampling_avail);