This series adds the possibility to configure the device, from sysfs, to work in peak mode. This enables adxl372 to capture only over threshold accelerations. 1. Create sysfs files for falling_period/rising_period and thresh_falling_value/thresh_rising_value in events/ dir. Set INT1 reg for activity/inactivity and push event code in events fifo on irq. 2. Add additional ABIs in order to explain the user that setting values in the events/ sysfs files also changes devices behaviour. 3. Update sysfs docs: renames, added two new entries for the activity_detect_event/ inactivity_detect_event Alexandru Tachici (3): iio: accel: adxl372: add event interface iio: accel: adxl372: add additional events ABIs iio: accel: adxl372: Update sysfs docs 1. Device FIFO can now be set in peak mode and only over the threshold accelerations will be stored. Stefan Popa (1): iio: accel: adxl372: Add support for FIFO peak mode Changelog v2 -> v3: - now use iio_device_claim_direct_mode before setting peak mode - if peak mode is enabled and not all axis are enabled, filter out disabled axis data before iio_push_to_buffers - add events enable attributes: (thresh_rising_en/thresh_falling_en) - renamed attr: buffer_peak_mode_enable to hwfifo_peak_mode_enable - squashed event interface related commits into one .../ABI/testing/sysfs-bus-iio-accel-adxl372 | 30 ++ drivers/iio/accel/adxl372.c | 345 +++++++++++++++++- 2 files changed, 368 insertions(+), 7 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-accel-adxl372 -- 2.20.1