[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251009173609.992452-1-flavra@baylibre.com>
Date: Thu, 9 Oct 2025 19:36:07 +0200
From: Francesco Lavra <flavra@...libre.com>
To: Lorenzo Bianconi <lorenzo@...nel.org>,
Jonathan Cameron <jic23@...nel.org>,
David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>,
linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 0/2] iio: imu: st_lsm6dsx: Decouple sensor ODR from FIFO batch data rate
The rate at which accelerometer or gyroscope sensor samples are fed
to the hardware FIFO (batch data rate, or BDR) does not have to
coincide with the sensor sampling frequency (output data rate, or
ODR); the only requirement is for the BDR to not be greater than
the ODR. Having a BDR lower than the ODR is useful in cases where
an application requires a high sampling rate for accurate detection
of motion events (e.g. wakeup events), but wants to read sensor
sample values from the device buffer at a lower data rate.
This change set amends the st_lsm6dsx IIO driver to support the above
use case. The first commit is a trivial fix to the source code comment
that indicates what measurement unit is used for the `odr` field of
struct st_lsm6ds_sensor, while the second commit introduces a new `bdr`
field in the same struct to implement the new functionality.
Francesco Lavra (2):
iio: imu: st_lsm6dsx: Fix measurement unit for odr struct member
iio: imu: st_lsm6dsx: Decouple sensor ODR from FIFO batch data rate
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 4 +-
.../iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 64 ++++++++++++++++---
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 9 ++-
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c | 4 +-
4 files changed, 67 insertions(+), 14 deletions(-)
--
2.39.5
Powered by blists - more mailing lists