Re: [PATCH v6 4/6] iio: pressure: dps310: add triggered buffer support
From: Andy Shevchenko
Date: Mon Aug 31 2026 - 03:03:20 EST
On Mon, Aug 31, 2026 at 01:41:46AM +0100, Jonathan Cameron wrote:
> On 2026-08-25 12:06:12+03:00, Andy Shevchenko wrote:
> > On Mon, Aug 24, 2026 at 11:12:01PM +0300, Rupesh Majhi wrote:
...
> > > +struct dps310_scan {
> > > + s32 channels[2];
> > > + aligned_s64 ts;
> > > +};
> >
> > Wondering if using macro here would make sense...
>
> Do you mean introducing a new one or using the buffer ones? I'd
> rather keep explicit structures where possible. They are much easier
> to reead as they make the data layout explicit, including the holes
> (as long as folk remember their c structure alignments!)
> - no holes here obviously!
>
> We only introduced the IIO_BUFFER macros to cover the cases we
> can't represent as a structure because the timestamp moves
> around as the number of channels enabled changes. Necessary
> trick to reduce the size of the kfifos.
Yeah, I got it. I need to remember your preference for the future.
--
With Best Regards,
Andy Shevchenko