]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: accel: adxl345: add activity event feature
authorLothar Rubusch <l.rubusch@gmail.com>
Sun, 27 Jul 2025 21:00:09 +0000 (21:00 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 16 Aug 2025 10:57:07 +0000 (11:57 +0100)
commit66a1af6d8a636bc7f6bb5ee0ae6b8d4b12631280
tree96e387e814ac03de7ffefffce297c2b64d1039b5
parentc6eac16025eb9760132b5cc5e70d9ae109801593
iio: accel: adxl345: add activity event feature

Enable the sensor to detect activity and trigger interrupts accordingly.
Activity events are determined based on a threshold, which is initialized
to a sensible default during probe. This default value is adopted from the
legacy ADXL345 input driver to maintain consistent behavior.

The combination of activity detection, ODR configuration, and range
settings lays the groundwork for the activity/inactivity hysteresis
mechanism, which will be implemented in a subsequent patch. As such,
portions of this patch prepare switch-case structures to support those
upcoming changes.

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