Re: [PATCH 2/5] iio: adc: Add ti-ads1262 driver

From: Jonathan Cameron

Date: Sat Jun 13 2026 - 10:07:04 EST



>
> > +static int ads1262_channel_hot_reload(struct ads1262 *st,
> > + const struct iio_chan_spec *chan)
> > +{
> > + unsigned int weight;
> > + unsigned long i;
> > + int ret;
> > +
> > + /*
> > + * Hot reloading is only required on buffer mode and if only one channel
> > + * is enabled.
> > + */
> > + if (!iio_device_try_claim_buffer_mode(st->indio_dev))
> > + return 0;
>
> Look at IIO_ACQUIRE_DIRECT_MODE()
obviously that comment is garbage - so please ignore!

>
> That should let you simplify the error paths in here.
> I see you used it elsewhere.