]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: accel: adxl345: extend inactivity time for less than 1s
authorLothar Rubusch <l.rubusch@gmail.com>
Sun, 27 Jul 2025 21:00:12 +0000 (21:00 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 16 Aug 2025 10:57:07 +0000 (11:57 +0100)
commitf6f22950d925c5e42ac5aeadafafcfc3c5c7b360
treea983a9d668b55e09b1d1d4d2a9532ed97441accc
parent31f7679bb69abfd3a0175608f8b0ee721cea8544
iio: accel: adxl345: extend inactivity time for less than 1s

Inactivity and free-fall events are essentially the same type of sensor
events. Therefore, inactivity detection (normally set for periods between 1
and 255 seconds) can be extended for shorter durations to support free-fall
detection.

For periods shorter than 1 second, the driver automatically configures the
threshold and duration using the free-fall register. For periods longer
than 1 second, it uses the inactivity threshold and duration using the
inactivity registers.

When using the free-fall register, the link bit is not set, which means
auto-sleep cannot be enabled if activity detection is also active.

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