Re: [PATCH 2/3] iio: accel: bmc150: use DMA-safe buffers for regmap bulk reads

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 Fri, Aug 14, 2026 at 03:48:43PM +0530, Yash Suthar wrote:
> The FIFO and read_raw buffers are passed to regmap bulk/raw reads
> ,which is not DMA-safe.Moved them into struct bmc150_accel_data
> after scan, each aligned to IIO_DMA_MINALIGN.

...

> +	/* DMA-safe buffers for bulk/raw reads */
> +	__le16 fifo_buff[BMC150_ACCEL_FIFO_LENGTH * 3]
> +		__aligned(IIO_DMA_MINALIGN);

Keep it on a single (but slightly longer) line.

	__le16 fifo_buff[BMC150_ACCEL_FIFO_LENGTH * 3] __aligned(IIO_DMA_MINALIGN);

> +	__le16 regval __aligned(IIO_DMA_MINALIGN);

-- 
With Best Regards,
Andy Shevchenko
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.