From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Neil Armstrong <neil.armstrong@linaro.org>
Cc: "David Laight" <david.laight.linux@gmail.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v3 3/3] iio: adc: add driver for the MAX34417 Four-Channel High Dynamic Range Power Accumulator
Date: Tue, 20 Oct 2026 12:32:29 +0300 [thread overview]
Message-ID: <atc1LVsZzfVF4NI9@ashevche-desk.local> (raw)
In-Reply-To: <729d7100-56b5-4826-be86-358e96be2882@linaro.org>
On Tue, Oct 20, 2026 at 11:18:31AM +0200, Neil Armstrong wrote:
> On 10/20/26 11:13, David Laight wrote:
> > On Tue, 13 Oct 2026 16:07:13 +0200
> > Neil Armstrong <neil.armstrong@linaro.org> wrote:
...
> > I was thinking:
> > struct { u64 pad:8; val:56 } buf;
> > then using bswap64(buf.val) >> 8 on LE.
> > But why not just:
> > u64 buf;
> > and be64toh(buf) & (BITULL(56) - 1)
>
> Right, I mean all this could work but I would like to keep using something
> simpler and get_unaligned_be56 matches all this.
> I don't think the need for performance is enough to use complex ways to get
> the value.
Also we need to be consistent with the existing implementations. If any of
those tricks will be needed, we better to apply to other cases (like e24/e48,
et cetera).
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-10-20 9:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 14:07 [PATCH v3 0/3] iio: adc: add support " Neil Armstrong
2026-10-13 14:07 ` [PATCH v3 1/3] dt-bindings: iio: add: document " Neil Armstrong
2026-10-13 16:28 ` Conor Dooley
2026-10-14 7:34 ` Neil Armstrong
2026-10-13 14:07 ` [PATCH v3 2/3] unaligned: introduce be56 unaligned accessors Neil Armstrong
2026-10-13 14:18 ` Andy Shevchenko
2026-10-13 14:07 ` [PATCH v3 3/3] iio: adc: add driver for the MAX34417 Four-Channel High Dynamic Range Power Accumulator Neil Armstrong
2026-10-13 14:53 ` Andy Shevchenko
2026-10-14 8:38 ` Neil Armstrong
2026-10-14 13:28 ` Andy Shevchenko
2026-10-17 22:47 ` Jonathan Cameron
2026-10-19 14:33 ` Neil Armstrong
2026-10-20 9:13 ` David Laight
2026-10-20 9:18 ` Neil Armstrong
2026-10-20 9:32 ` 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=atc1LVsZzfVF4NI9@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=david.laight.linux@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/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®