iio: accel: adxl345: introduce adxl345_push_event function
authorLothar Rubusch <l.rubusch@gmail.com>
Mon, 14 Apr 2025 18:42:35 +0000 (18:42 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 21 May 2025 13:20:27 +0000 (14:20 +0100)
commit5aec2b6e19de9c3d71ac599e01d20b5720fbeb68
tree0529675222640697fffd3aab07759fa1a79b8c28
parent1851c0f29d8a75ceeb1de1ac1379196a1f2aabaf
iio: accel: adxl345: introduce adxl345_push_event function

Move the fifo handling into a separate function. This is a preparation
for a generic handling of the interrupt status register results. The
function is supposed to handle particular sensor events, and later to
forward them to the iio channel. This is needed to read out the interrupt
status register.

The function shall return occurring errors, if any, or 0 in case of
handled events or read fifo content. Thus migrate fifo read-out and push
fifo content to iio channels into this function to be built up with
additional event handling.

Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
Link: https://patch.msgid.link/20250414184245.100280-2-l.rubusch@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/adxl345_core.c