From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: and.amer@gmail.com
Cc: "Peter Rosin" <peda@lysator.liu.se>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Liam Beguin" <liambeguin@gmail.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: afe: rescale: always expose offset
Date: Tue, 13 Oct 2026 00:23:30 +0300 [thread overview]
Message-ID: <as1P0ipISgbFztGo@ashevche-desk.local> (raw)
In-Reply-To: <20261012-iio-rescale-offset-v1-1-14ed15979ff2@gmail.com>
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
prev parent reply other threads:[~2026-10-12 21:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-12 8:28 Andrea Amer via B4 Relay
2026-10-12 21:23 ` Andy Shevchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=as1P0ipISgbFztGo@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=and.amer@gmail.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=liambeguin@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=peda@lysator.liu.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®