]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: imu: st_lsm6dsx: add tap event detection
authorFrancesco Lavra <flavra@baylibre.com>
Mon, 1 Dec 2025 10:00:18 +0000 (11:00 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 21 Dec 2025 11:41:11 +0000 (11:41 +0000)
commitce40e01d7ce2a15ba14fde314df30787fa1d58cb
tree54f4b6ccf89b03d4fdf98bbacb8ff3837b7526c3
parent317c9bef82ebe369fd1dac428eac505b5b6ff531
iio: imu: st_lsm6dsx: add tap event detection

In order to allow sensors to advertise tap event capability and report tap
events, define a new struct iio_event_spec array that includes a tap event
spec, and a new struct iio_chan_spec array that references the new
iio_event_spec array; for the LSM6DSV chip family, use the new
iio_chan_spec array and define an event source for tap events.
Tested on LSMDSV16X.

Signed-off-by: Francesco Lavra <flavra@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c