Re: [PATCH 6/9] iio: imu: st_lsm6dsx: remove event_threshold field from hw struct
From: Andy Shevchenko
Date: Thu Oct 30 2025 - 04:01:56 EST
On Thu, Oct 30, 2025 at 08:27:49AM +0100, Francesco Lavra wrote:
> This field is used to store the wakeup event detection threshold
> value. When adding support for more event types, some of which may
> have different threshold values for different axes, storing all
> threshold values for all event sources would be cumbersome. Thus,
> remove this field altogether, and read the currently configured
> value from the sensor when requested by userspace.
...
> + *val = (data & reg->mask) >> __ffs(reg->mask);
Seems like yet another candidate for field_get() macro.
--
With Best Regards,
Andy Shevchenko