Re: [PATCH] iio: afe: rescale: always expose offset
From: Andy Shevchenko
Date: Mon Oct 12 2026 - 17:25:24 EST
On Mon, Oct 12, 2026 at 10:28:53AM +0200, Andrea Amer via B4 Relay wrote:
> A rescale channel advertises IIO_CHAN_INFO_OFFSET only when its own
> offset is non-zero. A child rescale therefore hides a source offset,
> and consumers apply raw * scale and drop it. rescale_read_raw() already
> folds the source offset in, so expose the attribute in every case.
...
> chan->info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |
> - BIT(IIO_CHAN_INFO_SCALE);
> + BIT(IIO_CHAN_INFO_SCALE) |
> + BIT(IIO_CHAN_INFO_OFFSET);
Make it less churn by not changing line for _SCALE.
--
With Best Regards,
Andy Shevchenko