From: Jonathan Cameron <jic23@kernel.org>
To: Muhammad Abu Bakar <m.abubakar365@yahoo.com>
Cc: Marcelo Schmitt <marcelo.schmitt1@gmail.com>,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
andriy.shevchenko@intel.com, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 2/2] iio: pressure: add Sensirion SDP31 driver
Date: Sun, 18 Oct 2026 19:31:50 +0100 [thread overview]
Message-ID: <20261018193150.65ed7032@jic23-hlaptop> (raw)
In-Reply-To: <20261014194544.2705-1-m.abubakar365@yahoo.com>
On Thu, 15 Oct 2026 00:45:44 +0500
Muhammad Abu Bakar <m.abubakar365@yahoo.com> wrote:
> On Mon, 12 Oct 2026 12:09:47 -0300
> Marcelo Schmitt <marcelo.schmitt1@gmail.com> wrote:
>
> > > + indio_dev->name = "sdp31";
> > Hmm, I'm not sure whether it is a big deal or not but, the hardcoded name might
> > cause confusion if the part connected is sdp32 or sdp33. [...]
> > The full disambiguation solution would probably be to read the product
> > identifier bits and match those against a table of supported devices.
>
> Hi Marcelo,
>
> Thanks for taking a look, and good point.
>
> I kept the name hardcoded because, after Conor's comment on v4, the SDP32
> and SDP33 use sensirion,sdp31 as a fallback compatible, the way the sdp510
> does with the sdp500 driver. You're right that it isn't quite the same
> situation, though: the sdp500 and sdp510 are identical, while the SDP3x
> parts differ in range. The readings are still correct, since the scale is
> read from the sensor at probe, but the name would always say "sdp31".
>
> Reading the product identifier at probe and taking the name from a small
> chip_info table would fix that, and I'm happy to do it in a v7. Jonathan,
> would you prefer that, or is the current approach fine?
A question that is more 'interesting' than it would initially seem.
Normally I'd agree with Marcelo that we should be as user friendly as
possible, but there is a problem..
Given how well behaved and discoverable these parts are, the driver will
work fine for new parts that we don't know about (which is sadly rather
unusual!) That is why we can just use a single compatible.
If we were to use the right name and saw an unknown part, what would call
it? spd31 or something odd like spd31-compat. Then we would want to
add the new part name but run into a problem. Doing so would be potential
ABI breakage if anyone happened to be matching on spd31-compat :(
So let's go the easy way and just call them all spd31 as you have it today.
Good question though. My first reply that I typed out was to what Marcelo
was suggesting then I changed my mind!
Jonathan
>
> Thanks,
> Muhammad
next prev parent reply other threads:[~2026-10-18 18:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20261007205104.4694-1-m.abubakar365.ref@yahoo.com>
2026-10-07 20:51 ` [PATCH v6 0/2] " Muhammad Abu Bakar
2026-10-07 20:51 ` [PATCH v6 1/2] dt-bindings: iio: pressure: add Sensirion SDP31 Muhammad Abu Bakar
2026-10-07 20:51 ` [PATCH v6 2/2] iio: pressure: add Sensirion SDP31 driver Muhammad Abu Bakar
2026-10-12 15:09 ` Marcelo Schmitt
2026-10-14 19:45 ` Muhammad Abu Bakar
2026-10-18 18:31 ` Jonathan Cameron [this message]
2026-10-18 18:37 ` [PATCH v6 0/2] " Jonathan Cameron
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=20261018193150.65ed7032@jic23-hlaptop \
--to=jic23@kernel.org \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.abubakar365@yahoo.com \
--cc=marcelo.schmitt1@gmail.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®