Re: [PATCH v3 0/2] iio: imu: st_lsm6dsx: Decouple sensor ODR from FIFO batch data rate
From: Jonathan Cameron
Date: Sat Oct 18 2025 - 15:22:50 EST
On Fri, 17 Oct 2025 18:42:53 +0200
Francesco Lavra <flavra@xxxxxxxxxxxx> wrote:
> 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 (e.g. to
> minimize the amount of I2C or SPI traffic and the rate of periodic
> interrupts).
> 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
> `hwfifo_odr_mHz` field in the same struct to implement the new functionality.
>
Applied to the togreg branch of iio.git which is initially pushed out as testing
for the autobuilders to poke at it.
Thanks
Jonathan