Skip to content

st_lsm6dsx: add tap event detection

Francesco Lavra linux-iio lkml 4 versions – Applied

Status from this message: Applied to the fixes-togreg branch of iio.git (which I might not push out

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest9 patches 10 repliesApplied
  2. v39 patches 1 replySuperseded
  3. v29 patches 10 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v19 patches42 repliesSuperseded

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/9iio: imu: st_lsm6dsx: fix iio_chan_spec for sensors without event detectiondrivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c+11 -41 reply
2/9iio: imu: st_lsm6dsx: make event_settings more genericdrivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c+106 -601 reply
3/9iio: imu: st_lsm6dsx: move wakeup event enable mask to event_srcdrivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c+30 -571 reply
4/9iio: imu: st_lsm6dsx: rework code to check for enabled eventsdrivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c+8 -101 reply
5/9iio: imu: st_lsm6dsx: remove event_threshold field from hw structdrivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c+10 -52 replies
6/9iio: imu: st_lsm6dsx: make event management functions genericdrivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c+110 -421 reply
7/9iio: imu: st_lsm6dsx: add event configurability on a per axis basisdrivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c+88 -141 reply
8/9iio: imu: st_lsm6dsx: add event spec parameter to iio_chan_spec initializerdrivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c+16 -141 reply
9/9iio: imu: st_lsm6dsx: add tap event detectiondrivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c+56 -21 reply

Reviews trailers per patch

8 of 9 patches have a Reviewed-by or Acked-by.

PatchAndy ShevchenkoLorenzo Bianconi
1/9R-b A-b
2/9R-b A-b
3/9R-b A-b
4/9R-b
5/9R-b
6/9R-b A-b
7/9
8/9R-b
9/9R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/9] st_lsm6dsx: add tap event detection

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/[email protected]/T/
[2] https://lore.kernel.org/linux-iio/[email protected]/T/
[3] https://lore.kernel.org/linux-iio/[email protected]/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(-)
Signature · 1 line
2.39.5