[PATCH v4 0/4] iio: flow: Sensirion SLF3S liquid flow sensor
From: Wadim Mueller
Date: Thu Jun 11 2026 - 09:27:12 EST
Hi all,
this series adds a driver for the Sensirion SLF3S family of I2C liquid
flow sensors (SLF3S-0600F / -1300F / -4000B) and a new IIO_VOLUMEFLOW
channel type. As in v3 this is posted as a fresh thread.
Dependency
----------
The volume-flow scale is reported in m^3/s as a 64-bit fixed-point value
(IIO_VAL_DECIMAL64_FEMTO), so this series depends on Rodrigo Alencar's
"ADF41513/ADF41510 PLL frequency synthesizers" series, which adds the
IIO_VAL_DECIMAL64_* core formatting (and the kstrtodec64() and
div64_s64_rem() helpers it builds on):
https://lore.kernel.org/linux-iio/20260604-adf41513-iio-driver-v16-0-1a7d09143bc2@xxxxxxxxxx/
Patch 3/4 adds the IIO_VAL_DECIMAL64_FEMTO format type on top of that.
Changes since v3
----------------
* volumeflow unit switched from l/s to m^3/s (SI), per Jonathan
* scale now reported as IIO_VAL_DECIMAL64_FEMTO instead of
IIO_VAL_FRACTIONAL, so the small m^3/s values (~1.7e-12 m^3/s for the
SLF3S-0600F) keep full precision; this needs the new FEMTO core type
(3/4) and the dependency above
* dt-bindings: sensirion,slf3s-1300f now serves as the fallback
compatible for the other variants (all variants are detectable from
the product-information register), per Krzysztof; Marcelo's
Reviewed-by dropped because of this change
* dt-bindings: add interrupts (maxItems: 1) back
* dt-bindings: reflow the description to 80 columns
* dt-bindings: move "F: drivers/iio/flow/slf3s.c" to the driver patch
* driver: add system PM ops following the scd30/scd4x precedent: stop
the measurement and disable the supply on suspend; power back up,
wait out the power-up time and restart with the previously active
medium on resume
* driver: if switching the medium fails after the stop command, restart
with the previous medium instead of leaving the sensor idle
* driver: a sensor reporting an unknown sub-type now falls back to the
variant named in the device tree instead of failing probe, matching
the fallback-compatible semantics
* driver: serialise the command/response exchanges with a local mutex
instead of iio_device_claim_direct() / release_direct()
* driver: issue a stop-measurement at the start of probe(), so a sensor
left in continuous mode across a warm reboot does not NACK probe
* driver: read only the 6 bytes actually used (flow + temperature) per
measurement frame instead of 9
* driver: trim the per-variant list out of the Kconfig help text
* ABI: in_volumeflow_medium[_available] documented in
Documentation/ABI/testing/sysfs-bus-iio-flow; KernelVersion 7.3
The signaling-flags word (air-in-line / high-flow / smoothing status) in
each measurement frame is intentionally not read; exposing it can be a
later follow-up.
Thanks,
Wadim
Wadim Mueller (4):
iio: types: add IIO_VOLUMEFLOW channel type
dt-bindings: iio: flow: add Sensirion SLF3S liquid flow sensor
iio: core: add IIO_VAL_DECIMAL64_FEMTO format type
iio: flow: add Sensirion SLF3S liquid flow sensor driver
Documentation/ABI/testing/sysfs-bus-iio | 11 +
Documentation/ABI/testing/sysfs-bus-iio-flow | 21 +
.../bindings/iio/flow/sensirion,slf3s.yaml | 58 ++
MAINTAINERS | 8 +
drivers/iio/Kconfig | 1 +
drivers/iio/Makefile | 1 +
drivers/iio/flow/Kconfig | 22 +
drivers/iio/flow/Makefile | 7 +
drivers/iio/flow/slf3s.c | 521 ++++++++++++++++++
drivers/iio/industrialio-core.c | 3 +
include/linux/iio/types.h | 1 +
include/uapi/linux/iio/types.h | 1 +
tools/iio/iio_event_monitor.c | 2 +
13 files changed, 657 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-flow
create mode 100644 Documentation/devicetree/bindings/iio/flow/sensirion,slf3s.yaml
create mode 100644 drivers/iio/flow/Kconfig
create mode 100644 drivers/iio/flow/Makefile
create mode 100644 drivers/iio/flow/slf3s.c
base-commit: 3cd8b194bf3428dfa53120fee47e827a7c495815
prerequisite-patch-id: b51a25b69f7b78155e78d1a3aab809bcb57e11ae
prerequisite-patch-id: 1b26fb01ab41218c214fa58657305437565c06f8
prerequisite-patch-id: 7745e957a25b8673c7f838a9ae7a55269cd21798
prerequisite-patch-id: 5f805ccb0be820042ac732d0d8e1b188bfd2b2bc
prerequisite-patch-id: 80967f95ecb0c10fc66b3d073e99906126d5b40b
prerequisite-patch-id: 729fdedcf2055c506693d28a5dab65a6a3791598
--
2.52.0