devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petre Rodan <petre.rodan@subdimension.ro>
To: Jonathan Cameron <jic23@kernel.org>
Cc: 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
Subject: Re: [PATCH v3 2/2] iio: pressure: add Honeywell ABP2 driver
Date: Sun, 7 Dec 2025 08:58:36 +0200	[thread overview]
Message-ID: <aTUlnJTuZwvoSUPh@sunspire.home.arpa> (raw)
In-Reply-To: <20251206205407.6ba41d76@jic23-huawei>

[-- Attachment #1: Type: text/plain, Size: 1480 bytes --]


Hello Jonathan,

thank you for the review.

I actually heard about structs who's elements are 64byte padded so they don't end up in the same cache update in another context but up until today I did not make the connection with what is going on here.
thank you for the detailed explanation.

On Sat, Dec 06, 2025 at 08:54:07PM +0000, Jonathan Cameron wrote:
> On Thu, 04 Dec 2025 17:12:56 +0200
> Petre Rodan <petre.rodan@subdimension.ro> wrote:
> 
> > Adds driver for digital Honeywell ABP2 series of board mount
> > pressure and temperature sensors.

[..]

> Nice clean driver.

well, thank you. I will be sending in a few modifications to my other Honeywell
drivers based on feedback received here.

> > +#include <linux/jiffies.h>
> 
> I'm not immediately spotting use of this but I might well be missing it!

it's an indirect include for the definition of 'HZ'. requested by Andy.

> > +	data->scan.chan[0] = get_unaligned_be24(&data->rx_buf[1]);
> > +	data->scan.chan[1] = get_unaligned_be24(&data->rx_buf[4]);
> Turn on just the second channel and run the test in tools/iio/ for buffered
> reads.
> 
> You'll see data from the first channel not the one userspace asked for.
> Set available_scan_masks = { 0x3, 0 };
> allows the IIO core to know this is what is happening and shuffle the
> data as necessary for you.

nice catch. it was outputing pure garbage (not the first channel) but your change
fixed it.

best regards,
peter

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      parent reply	other threads:[~2025-12-07  6:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-04 15:12 [PATCH v3 0/2] iio: pressure: add Honeywell ABP2 driver Petre Rodan
2025-12-04 15:12 ` [PATCH v3 1/2] dt-bindings: iio: pressure: add honeywell,abp2030pa Petre Rodan
2025-12-06 20:33   ` Jonathan Cameron
2025-12-04 15:12 ` [PATCH v3 2/2] iio: pressure: add Honeywell ABP2 driver Petre Rodan
2025-12-06 20:54   ` Jonathan Cameron
2025-12-06 21:50     ` Andy Shevchenko
2025-12-07  6:58     ` Petre Rodan [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=aTUlnJTuZwvoSUPh@sunspire.home.arpa \
    --to=petre.rodan@subdimension.ro \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).