iio: accel: adxl345: add double tap feature
authorLothar Rubusch <l.rubusch@gmail.com>
Mon, 14 Apr 2025 18:42:37 +0000 (18:42 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 21 May 2025 13:20:27 +0000 (14:20 +0100)
commit5b307f5aaf080e10adb97e60d0af926f7ff0edb1
treef632189293c92638d1e6c815c4e5912c67d01089
parent7478933f036123ff1b374b2dcdcb2ca749cdbf6a
iio: accel: adxl345: add double tap feature

Add the double tap feature of the sensor. The interrupt handler needs
to catch and forward the event to the IIO channel. The single tap
implementation now is extended to deal with double tap as well.

Doubletap introduces window and latency times, both in us. Since both
times are scaled, the 8-bit register value is stored in hardware,
where the scaled value in [us] is stored as member variable.

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