From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: "Nuno Sá" <noname.nuno@gmail.com>
Cc: "Andy Shevchenko" <andriy.shevchenko@intel.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Nuno Sá via B4 Relay" <devnull+nuno.sa.analog.com@kernel.org>,
nuno.sa@analog.com, linux-iio@vger.kernel.org,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"David Lechner" <dlechner@baylibre.com>,
"Andy Shevchenko" <andy@kernel.org>
Subject: Re: [PATCH v3 06/10] iio: dac: ad5446: Separate I2C/SPI into different drivers
Date: Tue, 4 Nov 2025 14:00:07 +0000 [thread overview]
Message-ID: <20251104140007.00006f20@huawei.com> (raw)
In-Reply-To: <94c042be7ef7842f057d87d466ad7fffb17581ed.camel@gmail.com>
On Tue, 04 Nov 2025 07:44:13 +0000
Nuno Sá <noname.nuno@gmail.com> wrote:
> On Mon, 2025-11-03 at 21:30 +0200, Andy Shevchenko wrote:
> > On Mon, Nov 03, 2025 at 10:40:20AM +0000, Nuno Sá wrote:
> > > On Mon, 2025-11-03 at 09:39 +0200, Andy Shevchenko wrote:
> > > > On Sat, Nov 01, 2025 at 04:46:12PM +0000, Jonathan Cameron wrote:
> > > > > On Fri, 31 Oct 2025 12:31:27 +0000
> > > > > Nuno Sá via B4 Relay <devnull+nuno.sa.analog.com@kernel.org> wrote:
> >
> > ...
> >
> > > > > > + st->d16 = cpu_to_be16(val);
> > > > >
> > > > > Should have an include for this. Probably
> > > > >
> > > > > linux/byteorder/generic.h
> > > > > though the kernel (and iio) has a random mix of that and
> > > > > asm/byteorder.h
> > >
> > > Yeah, I did tried linux/byteorder/generic.h but it fails to compile if it's the
> > > first
> > > thing we include so I did not wanted to go that way :)
> > > > Can somebody go and fix all of them to be asm/byteorder.h? Yeah, it might need
> > > > some thinking as in some _rare_ cases the author might imply the explicit
> > > > choice of the algo in use. But then it might be problematic on some
> > > > architectures
> > > > as well...
> > > >
> > > > > Hmm. linux/unaligned.h is using asm/byteorder.h so maybe that's the better
> > > > > choice
> > > >
> > > > Yes.
> > >
> > > Hmm, so linux/unaligned.h or asm/byteorder.h? For the spi version I do have
> > > linux/unaligned.h beacuse we use some APIs but for i2c there's no use on
> > > unaligned so
> > > it feels a bit odd to include it?
> >
> > Maybe I misread what Jonathan said, but I meant that asm/byteorder.h is a
> > better choice over other *byteorder*.h variants.
>
> Ack. I was the one that got confused with your reply so I wanted to confirm
> before v4.
>
I only meant that it was probably right choice in unaligned.h to use asm/byteorder.h
So definitely agree fixing all cases up to use asm/byteorder.h is the way
to go based on Andy's feedback.
unaligned.h is only appropriate if the calls made are all the unaligned variants.
If it's a mix, should include that and asm/byteorder.h
Thanks,
Jonathan
> - Nuno Sá
>
next prev parent reply other threads:[~2025-11-04 14:00 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-31 12:31 [PATCH v3 00/10] iio: dac: ad5446: Refactor and add support for AD5542 Nuno Sá
2025-10-31 12:31 ` Nuno Sá via B4 Relay
2025-10-31 12:31 ` [PATCH v3 01/10] dt-bindings: iio: dac: Document AD5446 and similar devices Nuno Sá
2025-10-31 12:31 ` Nuno Sá via B4 Relay
2025-11-02 9:18 ` Krzysztof Kozlowski
2025-11-03 10:35 ` Nuno Sá
2025-10-31 12:31 ` [PATCH v3 02/10] iio: dac: ad5446: Use DMA safe buffer for transfers Nuno Sá
2025-10-31 12:31 ` Nuno Sá via B4 Relay
2025-10-31 13:36 ` Andy Shevchenko
2025-10-31 15:00 ` Nuno Sá
2025-10-31 15:07 ` Andy Shevchenko
2025-10-31 15:50 ` Jonathan Cameron
2025-11-03 10:43 ` Nuno Sá
2025-10-31 12:31 ` [PATCH v3 03/10] iio: dac: ad5446: Don't ignore missing regulator Nuno Sá
2025-10-31 12:31 ` Nuno Sá via B4 Relay
2025-10-31 13:40 ` Andy Shevchenko
2025-10-31 13:43 ` Andy Shevchenko
2025-10-31 12:31 ` [PATCH v3 04/10] iio: dac: ad5446: Move to single chip_info structures Nuno Sá
2025-10-31 12:31 ` Nuno Sá via B4 Relay
2025-10-31 13:47 ` Andy Shevchenko
2025-10-31 15:05 ` Nuno Sá
2025-10-31 15:08 ` Andy Shevchenko
2025-10-31 12:31 ` [PATCH v3 05/10] iio: dac: ad5456: Add missing DT compatibles Nuno Sá
2025-10-31 12:31 ` Nuno Sá via B4 Relay
2025-10-31 12:31 ` [PATCH v3 06/10] iio: dac: ad5446: Separate I2C/SPI into different drivers Nuno Sá
2025-10-31 12:31 ` Nuno Sá via B4 Relay
2025-11-01 16:46 ` Jonathan Cameron
2025-11-03 7:39 ` Andy Shevchenko
2025-11-03 10:40 ` Nuno Sá
2025-11-03 19:30 ` Andy Shevchenko
2025-11-04 7:44 ` Nuno Sá
2025-11-04 14:00 ` Jonathan Cameron [this message]
2025-10-31 12:31 ` [PATCH v3 07/10] iio: dac: ad5446: Make use of devm_mutex_init() Nuno Sá
2025-10-31 12:31 ` Nuno Sá via B4 Relay
2025-10-31 12:31 ` [PATCH v3 08/10] iio: dac: ad5446: Make use of the cleanup helpers Nuno Sá
2025-10-31 12:31 ` Nuno Sá via B4 Relay
2025-10-31 12:31 ` [PATCH v3 09/10] iio: dac: ad5446: Fix coding style issues Nuno Sá
2025-10-31 12:31 ` Nuno Sá via B4 Relay
2025-11-01 16:51 ` Jonathan Cameron
2025-11-03 10:44 ` Nuno Sá
2025-10-31 12:31 ` [PATCH v3 10/10] iio: dac: ad5446: Add AD5542 to the spi id table Nuno Sá
2025-10-31 12:31 ` Nuno Sá via B4 Relay
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=20251104140007.00006f20@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=Michael.Hennerich@analog.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=devnull+nuno.sa.analog.com@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=noname.nuno@gmail.com \
--cc=nuno.sa@analog.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.