]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: imu: st_lsm6dsx: rework code to check for enabled events
authorFrancesco Lavra <flavra@baylibre.com>
Mon, 1 Dec 2025 10:00:13 +0000 (11:00 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 21 Dec 2025 11:10:26 +0000 (11:10 +0000)
commitda6279f7587d55171d891ecb3dd1897cad5cad65
tree9d4a047bd18bcee24e26de59acfdae4da9b5f54f
parent87c3e0c138a7f01efb5de5e226055ab66345d3d0
iio: imu: st_lsm6dsx: rework code to check for enabled events

The enable_event field in struct st_lsm6dsx_hw does not lend itself well to
handling multiple event sources, so it will have to be modified to add
support for more event sources. As a preparatory step, remove references to
this field from code that does not deal with event management; rework the
st_lsm6dsx_check_events() function so that it returns whether any events
are currently enabled on a given sensor.

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