Re: [PATCH v2 2/2] iio: temperature: Add STS30 temperature sensor driver

From: Guenter Roeck

Date: Mon Jul 06 2026 - 12:36:46 EST


On 7/6/26 08:53, Jonathan Cameron wrote:
On Sat, 4 Jul 2026 20:57:17 -0500
Maxwell Doose <m32285159@xxxxxxxxx> wrote:

On Sun, 5 Jul 2026 00:00:53 +0100
Jonathan Cameron <jic23@xxxxxxxxxx> wrote:

On Sat, 4 Jul 2026 14:45:03 -0500
Maxwell Doose <m32285159@xxxxxxxxx> wrote:
Hi Jonathan,

On Fri, 3 Jul 2026 01:05:32 +0100
Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
On Sat, 20 Jun 2026 19:46:24 -0500
Maxwell Doose <m32285159@xxxxxxxxx> wrote:
Add a driver for the Sensirion STS30 family of temperature sensor
drivers over I2C. The STS30 family of sensors includes the STS30, STS31,
and STS35, all of which are supported by this driver, since they all
share the same commands, etc. and only differ in accuracy and tolerance.

The driver currently supports single-shot non-clock stretched readings,
by using a specified delay based on the repeatability/delay specified
by the user. The repeatability/delay can be changed at any time through
sysfs.

Additionally add Kconfig and Makefile entries for the driver as well as
a MAINTAINERS entry.

Signed-off-by: Maxwell Doose <m32285159@xxxxxxxxx>

Big question first. Why IIO? These are fairly basic temperature sensors
which typically means hwmon is more appropriate. What does it need
that hwmon doesn't provide?

The datasheet says that the STS30 supports continuous reads which means
that we can read it into a triggered buffer (which hwmon doesn't
support) and at some point I'd like to implement that.

Hmm. For a temperature chip that is often more about the monitors running
continuously than the ability to gather signals fast. Temperature changes
tend to be fairly slow when it's a physical sensor - gets less obvious when
infrared remote sensors are involved.

Even more relevant - there is an existing driver I think.
See drivers/hwmon/sht3x.c which supports things under the wildcard sts3x as well.
Check if that covers this part.

I think the last time I checked the sts30 series wasn't listed in the
dt-bindings but it may have changed since then. Oh well. I'll still go
check it out. If it's (very very) similar I would probably consider
dropping this one, otherwise I'll improve this one and resubmit once I
get the hardware.



Unless that other driver is for a very different part, then it is a non
starter to have a driver in IIO. Perhaps there are features missing in
the hwmon driver though. +CC Guenter and hwmon so they are aware of
this discussion.


I have no idea what might be missing, or why the existing hwmon driver
would not be sufficient. Lack of explicit devicetree support, as
suggested above ? That would require a few lines of code and an odd
reason to duplicate the driver in the iio subsystem. Triggered buffer ?
That makes sense for high speed ADCs, but not for low speed sensors
like this one.

Guenter