Re: [PATCH v4 1/3] iio: adc: Fix incorrect reading when datarate changed in single mode
From: Joshua Crofts
Date: Tue Jun 23 2026 - 05:33:02 EST
On Tue, 23 Jun 2026 12:16:39 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:
> > + return read_poll_timeout(ads1100_new_data_not_ready, data_ready,
> > + !data_ready, wait_time,
I'd actually be all for using `data_ready != 0`, to make the condition more
readable.
...
> > + PM_RUNTIME_ACQUIRE_AUTOSUSPEND(&data->client->dev, pm);
>
> > +
>
> This blank line is not needed as they are coupled, but I don't know if we have
> an agreed style in IIO for this.
I'd be surprised if there was an agreed style, as there aren't any IIO drivers
that use this specific macro (not in mainline at least). Additionally, might I
suggest using `PM_RUNTIME_ACQUIRE_IF_ENABLED_AUTOSUSPEND` as it is more generic?
--
Kind regards
CJD