iio: amplifiers: ada4250: use DMA-safe memory for regmap_bulk_read()
authorDavid Lechner <dlechner@baylibre.com>
Fri, 18 Apr 2025 18:16:13 +0000 (13:16 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 9 Jun 2025 06:45:35 +0000 (07:45 +0100)
commitc5858465a695c88fd427d1930c868750321b0409
treead876c1b7e64fe3b63a5e967f9c3edac6de3bf3e
parentb99dbe3a0f00953349dbf03e5d4af9233acb916e
iio: amplifiers: ada4250: use DMA-safe memory for regmap_bulk_read()

Use DMA-safe memory instead of stack-allocated memory for the call to
regmap_bulk_read() in the ada4250_init() function as this could be used
directly by a SPI controller.

Also remove unnecessary use of get_unaligned_le16() and explicitly
include linux/types.h e.g. for __le16 while we are fixing this up.

Note this is DMA issue does not appear to be an actual bug due to
internals of the regmap SPI implementation.  However, for IIO we are
following guidance that we should not make that assumption.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250418-iio-amplifiers-ada4250-simplify-data-buffer-in-init-v1-1-7e7bd6dad423@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/amplifiers/ada4250.c