From: Francesco Lavra <flavra@baylibre.com>
To: "Lorenzo Bianconi" <lorenzo@kernel.org>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v4 0/9] st_lsm6dsx: add tap event detection
Date: Mon, 1 Dec 2025 11:00:09 +0100 [thread overview]
Message-ID: <20251201100018.426749-1-flavra@baylibre.com> (raw)
The bulk of this patch set consists of reworking the existing code for
event detection (which supports IIO_EV_TYPE_THRESH events only) in order to
make it generic to accommodate different event types. Actual support for
tap events is implemented in the last patch.
Tested on LSMDSV16X.
Changes from v3 [3]:
- replaced double negation with single negation in
st_lsm6dsx_event_setup() (Andy)
Changes from v2 [2]:
- replaced status_reg and status_mask in struct st_lsm6dsx_event_src with a
struct st_lsm6dsx_reg field (Lorenzo)
- dropped new local variables in favor of directly using fields of existing
struct variables (Lorenzo)
- added blank line after return statements (Lorenzo)
- added Andy's Reviewed-by tag to patches 1-6,8-9
- added Lorenzo's Acked-by tag to patches 1-3,6,9
Changes from v1 [1]:
- added Fixes tag to patch 1/9 (Andy, Lorenzo)
- added st_lsm6dsx_field_get() temporary macro, to be removed once the
generic FIELD_GET() macro lands (Andy)
- refactored st_lsm6dsx_write_event_config() with the addition of two
helper functions st_lsm6dsx_check_other_events() and
st_lsm6dsx_events_enable() (Andy)
- replaced dynamic allocation of iio_chan_spec and iio_event_spec arrays
with the addition of new static arrays (Jonathan)
- changed line wrapping to 80 characters (Lorenzo, Andy)
- changed line wrapping for commit messages to 75 characters (Jonathan)
- added comments to st_lsm6dsx_event_setup() and st_lsm6dsx_get_event_reg()
(Andy)
- miscellaneous stylistic changes (Andy)
[1] https://lore.kernel.org/linux-iio/20251030072752.349633-1-flavra@baylibre.com/T/
[2] https://lore.kernel.org/linux-iio/20251120082615.3263892-1-flavra@baylibre.com/T/
[3] https://lore.kernel.org/linux-iio/20251125202307.4033346-1-flavra@baylibre.com/T/
Francesco Lavra (9):
iio: imu: st_lsm6dsx: fix iio_chan_spec for sensors without event
detection
iio: imu: st_lsm6dsx: make event_settings more generic
iio: imu: st_lsm6dsx: move wakeup event enable mask to event_src
iio: imu: st_lsm6dsx: rework code to check for enabled events
iio: imu: st_lsm6dsx: remove event_threshold field from hw struct
iio: imu: st_lsm6dsx: make event management functions generic
iio: imu: st_lsm6dsx: add event configurability on a per axis basis
iio: imu: st_lsm6dsx: add event spec parameter to iio_chan_spec
initializer
iio: imu: st_lsm6dsx: add tap event detection
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 56 +-
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 538 +++++++++++++------
2 files changed, 395 insertions(+), 199 deletions(-)
--
2.39.5
next reply other threads:[~2025-12-01 10:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-01 10:00 Francesco Lavra [this message]
2025-12-01 10:00 ` [PATCH v4 1/9] iio: imu: st_lsm6dsx: fix iio_chan_spec for sensors without " Francesco Lavra
2025-12-07 15:15 ` Jonathan Cameron
2025-12-01 10:00 ` [PATCH v4 2/9] iio: imu: st_lsm6dsx: make event_settings more generic Francesco Lavra
2025-12-07 15:21 ` Jonathan Cameron
2025-12-01 10:00 ` [PATCH v4 3/9] iio: imu: st_lsm6dsx: move wakeup event enable mask to event_src Francesco Lavra
2025-12-07 15:22 ` Jonathan Cameron
2025-12-01 10:00 ` [PATCH v4 4/9] iio: imu: st_lsm6dsx: rework code to check for enabled events Francesco Lavra
2025-12-07 15:27 ` Jonathan Cameron
2025-12-01 10:00 ` [PATCH v4 5/9] iio: imu: st_lsm6dsx: remove event_threshold field from hw struct Francesco Lavra
2025-12-07 15:31 ` Jonathan Cameron
2025-12-07 22:50 ` Andy Shevchenko
2025-12-01 10:00 ` [PATCH v4 6/9] iio: imu: st_lsm6dsx: make event management functions generic Francesco Lavra
2025-12-07 15:33 ` Jonathan Cameron
2025-12-01 10:00 ` [PATCH v4 7/9] iio: imu: st_lsm6dsx: add event configurability on a per axis basis Francesco Lavra
2025-12-07 15:35 ` Jonathan Cameron
2025-12-01 10:00 ` [PATCH v4 8/9] iio: imu: st_lsm6dsx: add event spec parameter to iio_chan_spec initializer Francesco Lavra
2025-12-07 15:36 ` Jonathan Cameron
2025-12-01 10:00 ` [PATCH v4 9/9] iio: imu: st_lsm6dsx: add tap event detection Francesco Lavra
2025-12-07 15:40 ` 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=20251201100018.426749-1-flavra@baylibre.com \
--to=flavra@baylibre.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=nuno.sa@analog.com \
/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
all inboxes | Powered by JetHome®