diff options
| author | Gabriel Rondon <grondon@gmail.com> | 2026-08-18 22:51:21 +0100 |
|---|---|---|
| committer | Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> | 2026-08-31 00:52:15 +0100 |
| commit | 8c5f649119f442a2f9bb5be629323ee62b3690df (patch) | |
| tree | 81a07fd15d61a1bfb833038b26e5459741e6d178 /include/linux | |
| parent | 02f4bd272bf7be0edb54dec921d64af866b411b8 (diff) | |
iio: accel: kionix-kx022a: use scan struct for one-shot and trigger reads
The driver kept two separate staging areas that hold the same thing:
buffer[8], a DMA-aligned area used by the one-shot read in
kx022a_get_axis() and by the triggered handler, and the scan struct,
used by the FIFO flush path. Both are three __le16 channels plus room
for the timestamp.
Drop buffer and route the one-shot read and the triggered handler
through scan.channels, so the driver has a single staging area. Move the
IIO_DMA_MINALIGN alignment onto scan, since it now backs the regmap bulk
reads that buffer used to.
No functional change. get_axis() only runs via read_raw() under
iio_device_claim_direct(), so it cannot run while the triggered buffer is
active, and the triggered handler only runs while it is; the two never
touch scan concurrently, exactly as they previously shared buffer.
Signed-off-by: Gabriel Rondon <grondon@gmail.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
