Re: [PATCH v3 0/3] iio: accel: bmc150: DMA-safe buffers and use iio_push_to_buffers_with_ts()
Andy Shevchenko <[email protected]>
| Newsgroups | org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel |
|---|---|
| Organization | Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo |
| Message-ID | <[email protected]> |
On Tue, Aug 25, 2026 at 02:21:53PM +0530, Yash Suthar wrote: > The trigger path used a plain s16 buffer while the FIFO path already had > a properly typed scan member (__le16 + aligned timestamp). Those two > buffers did the same job, and s16 does not represent little-endian data. > Drop the duplicate, keep scan at the end of struct bmc150_accel_data with > IIO_DMA_MINALIGN, and use it for both the trigger and FIFO paths. > > The FIFO and read_raw buffers are passed to regmap bulk/raw reads, which > is not DMA-safe. Move them into struct bmc150_accel_data after the aligned > scan buffer. Because all buffers are serialized by data->mutex, placing > them after scan ensures DMA safety without needing separate alignment. > > Finally, replace the deprecated iio_push_to_buffers_with_timestamp() with > iio_push_to_buffers_with_ts() so the push sites pass an explicit buffer > size. > > This supersedes the earlier standalone patches: > Link: https://lore.kernel.org/linux-iio/[email protected]/ > Link: https://lore.kernel.org/linux-iio/[email protected]/ In this case it's better not to use Link: tag. `b4` can't distinguish them from the important ones. > Link to v1: https://lore.kernel.org/all/[email protected]/ > Link to v2: https://lore.kernel.org/linux-iio/[email protected]/ -- With Best Regards, Andy Shevchenko