linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <alexandru.tachici@analog.com>
To: <linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <jic23@kernel.org>
Subject: [PATCH v4 0/3] iio: accel: adxl372: add peak mode
Date: Mon, 3 Aug 2020 20:22:16 +0300	[thread overview]
Message-ID: <20200803172219.33911-1-alexandru.tachici@analog.com> (raw)

From: Alexandru Tachici <alexandru.tachici@analog.com>

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. Document use of iio events sysfs files.

Alexandru Tachici (2):
  iio: accel: adxl372: add event interface
  docs: iio: Add adxl372 documentation

1. Device FIFO can now be set in peak mode and only over the
threshold accelerations will be stored. Driver sets adxl372
FIFO in peak mode when the peak iio:trigger is selected.

Stefan Popa (1):
  iio: accel: adxl372: Add support for FIFO peak mode

  Changelog v3 -> v4:
  - add mutex for threshold write so that writing the two
  registers becomes atomic
  - added a trigger for peak mode, when selected in the trigger
  user interface, adxl372 will start recording only peak acceleration
  data in the fifo
  - added a adxl372.rst doc file explaining the use of iio events sysfs

 Documentation/iio/adxl372.rst |  46 +++++
 Documentation/iio/index.rst   |   1 +
 drivers/iio/accel/adxl372.c   | 328 +++++++++++++++++++++++++++++++++-
 3 files changed, 367 insertions(+), 8 deletions(-)
 create mode 100644 Documentation/iio/adxl372.rst

-- 
2.20.1


             reply	other threads:[~2020-08-03 17:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-03 17:22 alexandru.tachici [this message]
2020-08-03 17:22 ` [PATCH v4 1/3] iio: accel: adxl372: Add support for FIFO peak mode alexandru.tachici
2020-08-09 13:11   ` Jonathan Cameron
2020-08-03 17:22 ` [PATCH v4 2/3] iio: accel: adxl372: add event interface alexandru.tachici
2020-08-09 13:19   ` Jonathan Cameron
2020-08-03 17:22 ` [PATCH v4 3/3] docs: iio: Add adxl372 documentation alexandru.tachici
2020-08-09 13:21   ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200803172219.33911-1-alexandru.tachici@analog.com \
    --to=alexandru.tachici@analog.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).