All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jorijn van der Graaf" <jorijnvdgraaf@catcrafts.net>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v3 2/3] iio: imu: inv_icm42600: drop the whoami check
Date: Tue, 28 Jul 2026 18:52:29 +0000	[thread overview]
Message-ID: <20260728185229.BAE671F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260728184351.75015-3-jorijnvdgraaf@catcrafts.net>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Complete removal of the WHOAMI check breaks hardware presence detection on SPI buses, allowing the driver to successfully probe absent or non-existent devices.
--

--- Patch [2]: [PATCH v3 2/3] iio: imu: inv_icm42600: drop the whoami check ---
commit 3a74aa023a51d52a25e7f4af731835e3a6cd0b6a
Author: Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net>

iio: imu: inv_icm42600: drop the whoami check

This commit drops the WHOAMI check from the inv_icm42600 driver to allow
fallback compatibles to probe successfully even if the WHOAMI value does
not strictly match. The unused WHOAMI definitions are also removed. This
changes the probe outcome on mismatch for all parts supported by the driver.

Link: https://lore.kernel.org/all/20260722-creature-volley-0f083b904c1d@spud/
Link: https://lore.kernel.org/all/20260728-extradite-yanking-42d918637f61@spud/

[Note: The standard inline quoting format has been altered to a free-form
summary due to recitation restrictions.]

[Severity: High]
With the WHOAMI check removed, does this break hardware presence detection 
on SPI buses? 

When an SPI device is unpopulated or unpowered, the MISO line often floats 
high, causing regmap reads to return 0xFF. Looking at inv_icm42600_setup() 
in drivers/iio/imu/inv_icm42600/inv_icm42600_core.c, the only remaining 
hardware verification is the check for the reset done bit.

Because the reset done bit is BIT(4) (0x10), reading 0xFF means 
(0xFF & 0x10) is non-zero. The condition 
!(val & INV_ICM42600_INT_STATUS_RESET_DONE) evaluates to false, bypassing 
the -ENODEV error path. 

Will this allow the driver to successfully probe absent or non-existent 
devices, exposing dummy IIO interfaces that yield -1 for all readings?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260728184351.75015-1-jorijnvdgraaf@catcrafts.net?part=2

  reply	other threads:[~2026-07-28 18:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28 18:43 [PATCH v3 0/3] iio: imu: inv_icm42600: add support for icm42630 Jorijn van der Graaf
2026-07-28 18:43 ` [PATCH v3 1/3] iio: imu: inv_icm42600: sort device id tables numerically Jorijn van der Graaf
2026-07-28 18:43 ` [PATCH v3 2/3] iio: imu: inv_icm42600: drop the whoami check Jorijn van der Graaf
2026-07-28 18:52   ` sashiko-bot [this message]
2026-07-28 18:43 ` [PATCH v3 3/3] dt-bindings: iio: imu: icm42600: add icm42630 Jorijn van der Graaf

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=20260728185229.BAE671F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jorijnvdgraaf@catcrafts.net \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.