Re: [PATCH 1/9] iio: imu: st_lsm6dsx: dynamically initialize iio_chan_spec data
From: Andy Shevchenko
Date: Fri Oct 31 2025 - 04:32:42 EST
On Fri, Oct 31, 2025 at 09:26:19AM +0100, Francesco Lavra wrote:
> On Thu, 2025-10-30 at 17:42 +0100, Lorenzo Bianconi wrote:
> > > + chan->ext_info = st_lsm6dsx_ext_info;
> > > + if (id == ST_LSM6DSX_ID_ACC) {
> > > + if (hw->settings->event_settings.wakeup_reg.addr) {
> >
> > if (id == ST_LSM6DSX_ID_ACC &&
> > hw->settings->event_settings.wakeup_reg.addr) {
> > ...
> > }
>
> In patch 4/9, the inner conditional will be replaced by more generic code,
> so we would revert to if (id == ST_LSM6DSX_ID_ACC) [...]
Hmm... The obvious follow up question is why can't we stick with the original
conditional to begin with?
--
With Best Regards,
Andy Shevchenko