iio: accel: adxl345: add single tap feature
authorLothar Rubusch <l.rubusch@gmail.com>
Mon, 14 Apr 2025 18:42:36 +0000 (18:42 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 21 May 2025 13:20:27 +0000 (14:20 +0100)
commit7478933f036123ff1b374b2dcdcb2ca749cdbf6a
tree1d17edcc959ebecd60e63d63bf438da1d4e220a2
parent5aec2b6e19de9c3d71ac599e01d20b5720fbeb68
iio: accel: adxl345: add single tap feature

Add the single tap feature with a threshold in 62.5mg/LSB points and a
scaled duration in us. Keep singletap threshold in regmap cache but
the scaled value of duration in us as member variable.

Both use IIO channels for individual enable of the x/y/z axis. Initializes
threshold and duration with reasonable content. When an interrupt is
caught it will be pushed to the according IIO channel.

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