Re: [PATCH v3 3/3] iio: accel: bmc150: use iio_push_to_buffers_with_ts()

From: Jonathan Cameron

Date: Sun Aug 30 2026 - 20:44:48 EST


On Thu, 27 Aug 2026 10:08:07 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:

Hi Andy,

> On Tue, Aug 25, 2026 at 02:21:56PM +0530, Yash Suthar wrote:
> > Replace deprecated iio_push_to_buffers_with_timestamp() with
> > iio_push_to_buffers_with_ts() to allow source size runtime checks.
>
> With this you might want to use IIO_DECLARE_DMA_BUFFER_WITH_TS() in the
> definition of the scan buffer.
>
Why? The structure used is:
struct {
__le16 channels[3];
aligned_s64 ts;
} scan __aligned(IIO_DMA_MINALIGN);

So given we never let things get enabled with just timestamp, the timestamp
and channels always end up in the places the structure describes.

Where that is the case, I much prefer this to the magic buffer with enough
elements of the channel type on the end.

Jonathan