Re: [PATCH v4 6/9] iio: imu: st_lsm6dsx: make event management functions generic

From: Jonathan Cameron

Date: Sun Dec 07 2025 - 10:34:06 EST


On Mon, 1 Dec 2025 11:00:15 +0100
Francesco Lavra <flavra@xxxxxxxxxxxx> wrote:

> In preparation for adding support for more event types, use an array
> indexed by event ID instead of a scalar value to store enabled events, and
> refactor the functions to configure and report events so that their
> implementation is not specific for wakeup events. Move the logic to update
> the global event interrupt enable flag from st_lsm6dsx_event_setup() to its
> calling function, so that it can take into account also event sources
> different from the source being configured. While changing the signature of
> the st_lsm6dsx_event_setup() function, opportunistically add the currently
> unused `axis` parameter, which will be used when adding support for
> enabling and disabling events on a per axis basis.
>
> Signed-off-by: Francesco Lavra <flavra@xxxxxxxxxxxx>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
> Acked-by: Lorenzo Bianconi <lorenzo@xxxxxxxxxx>
Applied.