Re: [PATCH v6 2/2] iio: pressure: add Sensirion SDP31 driver
From: Muhammad Abu Bakar
Date: Wed Oct 14 2026 - 15:46:35 EST
On Mon, 12 Oct 2026 12:09:47 -0300
Marcelo Schmitt <marcelo.schmitt1@xxxxxxxxx> 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?
Thanks,
Muhammad