From: Jonathan Cameron <jic23@kernel.org>
To: Conor Dooley <conor@kernel.org>
Cc: "Jorijn van der Graaf" <jorijnvdgraaf@catcrafts.net>,
"Jean-Baptiste Maneyrol" <Jean-Baptiste.Maneyrol@tdk.com>,
"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>,
"Chris Morgan" <macromorgan@hotmail.com>,
"Luca Weiss" <luca.weiss@fairphone.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: iio: imu: icm42600: add icm42630
Date: Fri, 24 Jul 2026 01:22:07 +0100 [thread overview]
Message-ID: <20260724012207.56d737bc@jic23-huawei> (raw)
In-Reply-To: <20260722-creature-volley-0f083b904c1d@spud>
On Wed, 22 Jul 2026 17:59:42 +0100
Conor Dooley <conor@kernel.org> wrote:
> On Tue, Jul 21, 2026 at 07:16:47PM +0200, Jorijn van der Graaf wrote:
> > On Tue, Jul 21, 2026 at 05:01:26PM +0100, Conor Dooley wrote:
> > > On Mon, Jul 20, 2026 at 07:34:10PM +0200, Jorijn van der Graaf wrote:
> > > > The TDK InvenSense ICM-42630 is a 6-axis IMU of the ICM-42600 family,
> > > > found e.g. in the Fairphone 6. Document its compatible.
> > > >
> > > > A fallback compatible to a sibling is not usable: the part reports its
> > > > own WHOAMI register value, which software validates against the
> > > > compatible.
> > >
> > > Why does software do this? If the whoami is the only difference, the
> > > software should stop checking it.
> >
> > Whether the whoami is the only difference is exactly what I cannot
> > establish: the part has no public datasheet. What I can establish is
> > driver-visible: the unmodified driver has been tested to drive it
> > correctly, and Jean-Baptiste confirmed the chip is "similar" to the
> > ICM-42631 and "can be supported by inv_icm42600 driver without any
> > modification". That is short of knowing the parts are identical (the
> > family has precedent for real differences behind the same register
> > layout: ICM-42686, different full-scale ranges), so I did not want
> > to claim full compatibility with a sibling.
> >
> > As for the check: it is not mine - inv_icm42600 has returned -ENODEV
> > on a whoami mismatch since its 2020 introduction (and per-part config
> > does differ within the family, see above). Since every released
> > kernel enforces it, a fallback would not probe on any kernel already
> > out there regardless of what we change now; and even if the check
> > were relaxed, a fallback-matched part would bind with icm42631 as
> > its ABI-visible name - so the dedicated compatible is needed either
>
> Is that really problematic? It's not problematic for any of the dozens
> of other IIO devices that use fallbacks, is there something that would
> make this one different?
>
> > way. Whether the check should become a warning is
> > Jean-Baptiste's call, as a behavior change for all parts the driver
> > supports; I did not want to gate a trivial ID addition on it, but am
> > happy to send that as a follow-up if wanted.
>
> The check should be deleted since it prevent using fallbacks.
> IMO, delete the check and add the fallback rather than retain it and
> propagate the issue. Even if you think having a fallback is a bad idea
> because you cannot be 101% sure that there are no programming model
> differences, delete the check. Personally I think that given the
> testing, patches and quote from JeanBaptiste, a fallback is suitable
> here.
>
> I think Jonathan has sorta changed his stance "recently" on the
> correctness of checking whoami values versus the compatible, so what was
> done in 2020 doesn't represent what's the current guidance and I am
> always a proponent of removing these checks whenever I become aware of
> one preventing use of fallbacks.
Yup. I was convinced (probably by you ;) that whoami hard checks should
go. There are quite a lot left from before that time and this probably
one of those.
If it does turn out there is a difference then that is what the specific
compatible allows us to handle
So dt-binding wise, please go with the fallback route for this new part.
For old kernels that just means backporting relaxing that constraint and given
a backport is required either way it doesn't matter.
At least a first glance all that is needed is to drop the error return?
Thanks,
Jonathan
>
> Cheers,
> Conor.
>
> > The commit message led with the driver check where the real reason
> > is the identity uncertainty above; I will reword that in a v2 if one
> > is needed.
> >
> > Thanks,
> > Jorijn
next prev parent reply other threads:[~2026-07-24 0:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 17:34 [PATCH 0/2] iio: imu: inv_icm42600: add support for icm42630 Jorijn van der Graaf
2026-07-20 17:34 ` [PATCH 1/2] dt-bindings: iio: imu: icm42600: add icm42630 Jorijn van der Graaf
2026-07-21 7:14 ` Jean-Baptiste Maneyrol
2026-07-21 16:01 ` Conor Dooley
2026-07-21 17:16 ` Jorijn van der Graaf
2026-07-22 16:59 ` Conor Dooley
2026-07-24 0:22 ` Jonathan Cameron [this message]
2026-07-20 17:34 ` [PATCH 2/2] iio: imu: inv_icm42600: add support for icm42630 Jorijn van der Graaf
2026-07-21 7:18 ` Jean-Baptiste Maneyrol
2026-07-24 0:25 ` Jonathan Cameron
2026-07-21 7:12 ` [PATCH 0/2] " Jean-Baptiste Maneyrol
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=20260724012207.56d737bc@jic23-huawei \
--to=jic23@kernel.org \
--cc=Jean-Baptiste.Maneyrol@tdk.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jorijnvdgraaf@catcrafts.net \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.weiss@fairphone.com \
--cc=macromorgan@hotmail.com \
--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®