Re: [PATCH v4 8/9] iio: imu: st_lsm6dsx: add event spec parameter to iio_chan_spec initializer
From: Jonathan Cameron
Date: Sun Dec 07 2025 - 10:37:01 EST
On Mon, 1 Dec 2025 11:00:17 +0100
Francesco Lavra <flavra@xxxxxxxxxxxx> wrote:
> In preparation for adding support for more event sources, add to the
> ST_LSM6DSX_CHANNEL_ACC() iio_chan_spec initializer macro an iio_event_spec
> array argument, so that this macro can be used with different arrays by
> sensors that support different event sources; change the st_lsm6dsx_event
> struct declaration to an array (renamed as st_lsm6dsx_ev_motion) so that it
> can be passed to the macro (and opportunistically move it from the header
> file where it does not belong to the C file where it is used).
> In addition, remove from this macro the channel type parameter and
> hard-code IIO_ACCEL in the macro definition, since all callers use
> IIO_ACCEL as channel type argument.
>
> Signed-off-by: Francesco Lavra <flavra@xxxxxxxxxxxx>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
Applied.
Thanks,
J