[PATCH v2 0/3] accel: adxl380: Add support for 1 kHz sampling frequency

Francesco Lavra posted 3 patches 3 weeks, 1 day ago
drivers/iio/accel/adxl380.c | 122 +++++++++++++++++++++++++-----------
drivers/iio/accel/adxl380.h |  10 ++-
2 files changed, 95 insertions(+), 37 deletions(-)
[PATCH v2 0/3] accel: adxl380: Add support for 1 kHz sampling frequency
Posted by Francesco Lavra 3 weeks, 1 day ago
This series adds support for 1kHz sampling frequency for sensor variants
that implement low-power mode.
The first patch is a preparatory step to decouple sampling frequency values
from decimation filter settings, the second patch introduces a new helper
function to check whether activity/inactivity detection is enabled, and the
last patch adds support for the new sampling frequency value.
Tested on ADXL382.

Changes from v1 [1]:
- added Nuno's reviewed-by tag to patch 1
- modified reporting of available frequencies and setting of current
  frequency to reflect activity detection status (Jonathan)

[1] https://lore.kernel.org/linux-iio/20260107123518.4017292-1-flavra@baylibre.com/T/

Francesco Lavra (3):
  iio: accel: adxl380: Store sampling frequency index in odr struct
    member
  iio: accel: adxl380: Introduce helper function for activity detection
  iio: accel: adxl380: Add support for 1 kHz sampling frequency

 drivers/iio/accel/adxl380.c | 122 +++++++++++++++++++++++++-----------
 drivers/iio/accel/adxl380.h |  10 ++-
 2 files changed, 95 insertions(+), 37 deletions(-)

-- 
2.39.5
Re: [PATCH v2 0/3] accel: adxl380: Add support for 1 kHz sampling frequency
Posted by Jonathan Cameron 3 weeks ago
On Thu, 15 Jan 2026 18:53:47 +0100
Francesco Lavra <flavra@baylibre.com> wrote:

> This series adds support for 1kHz sampling frequency for sensor variants
> that implement low-power mode.
> The first patch is a preparatory step to decouple sampling frequency values
> from decimation filter settings, the second patch introduces a new helper
> function to check whether activity/inactivity detection is enabled, and the
> last patch adds support for the new sampling frequency value.
> Tested on ADXL382.

Applied with tweaks as called out in replies to individual patches to
the testing branch of iio.git. I'm rushing this a bit as I'm not sure how
early next week I'll get to IIO stuff but if Nuno or anyone else wants to
take a look (+ give tags or ask me to drop it for a v3) then that is fine!

Jonathan

> 
> Changes from v1 [1]:
> - added Nuno's reviewed-by tag to patch 1
> - modified reporting of available frequencies and setting of current
>   frequency to reflect activity detection status (Jonathan)
> 
> [1] https://lore.kernel.org/linux-iio/20260107123518.4017292-1-flavra@baylibre.com/T/
> 
> Francesco Lavra (3):
>   iio: accel: adxl380: Store sampling frequency index in odr struct
>     member
>   iio: accel: adxl380: Introduce helper function for activity detection
>   iio: accel: adxl380: Add support for 1 kHz sampling frequency
> 
>  drivers/iio/accel/adxl380.c | 122 +++++++++++++++++++++++++-----------
>  drivers/iio/accel/adxl380.h |  10 ++-
>  2 files changed, 95 insertions(+), 37 deletions(-)
>