mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: David Lechner <dlechner@baylibre.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Yasin Lee" <yasin.lee.x@gmail.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Jonathan Cameron" <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH] iio: proximity: hx9023s: fix scan_type endianness
Date: Wed, 23 Jul 2025 17:13:37 +0300	[thread overview]
Message-ID: <aIDuEcHhaGtz2klP@smile.fi.intel.com> (raw)
In-Reply-To: <823a28d6-e612-4e32-976a-cb99945848ce@baylibre.com>

On Tue, Jul 22, 2025 at 06:08:37PM -0500, David Lechner wrote:
> On 7/22/25 6:07 PM, David Lechner wrote:
> > Change the scan_type endianness from IIO_BE to IIO_LE. This matches
> > the call to cpu_to_le16() in hx9023s_trigger_handler() that formats
> > the data before pushing it to the IIO buffer.

> It is odd to have data already in CPU-endian and convert it to LE
> before pushing to buffers. So I'm a bit tempted to do this instead
> since it probably isn't likely anyone is using this on a big-endian
> system:

I can say that first of all, we need to consult with the datasheet for the
actual HW endianess. And second, I do not believe that CPU endianess may be
used, I can't imagine when this (discrete?) component can be integrated in such
a way. That said, I think your second approach even worse.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2025-07-23 14:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-22 23:07 David Lechner
2025-07-22 23:08 ` David Lechner
2025-07-23 14:13   ` Andy Shevchenko [this message]
2025-07-23 14:29     ` David Lechner
2025-07-23 14:37       ` Andy Shevchenko
2025-07-23 14:57         ` David Lechner
2025-07-23 15:06           ` Andy Shevchenko
2025-07-23 15:11             ` David Lechner
2025-07-23 15:56               ` Jonathan Cameron
2025-08-25 17:07                 ` David Lechner

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=aIDuEcHhaGtz2klP@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=yasin.lee.x@gmail.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 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®