Re: [RFC PATCH v1 3/4] iio: flow: add Sensirion SLF3x liquid flow sensor driver
From: Jonathan Cameron
Date: Tue May 26 2026 - 13:12:15 EST
On Sun, 24 May 2026 22:49:38 +0200
Wadim Mueller <wafgo01@xxxxxxxxx> wrote:
> From: Wadim Mueller <wadim.mueller@xxxxxxxx>
>
> Add an IIO driver for the Sensirion SLF3S family of digital
> liquid-flow sensors. The supported sub-types (SLF3S-0600F,
> SLF3S-4000B) share the same register map and command set and are
> distinguished only by the flow scale; the variant is detected at
> probe time from the product-information register.
>
> The driver exposes two IIO channels:
> - in_volumeflow_raw / in_volumeflow_scale (litres per second)
> - in_temp_raw / in_temp_scale (milli-degC)
>
> Continuous measurement mode is started in probe and stopped via
> devm-action; read_raw() fetches the most recent sample on demand.
>
> Signed-off-by: Wadim Mueller <wadim.mueller@xxxxxxxx>
Also see:
https://sashiko.dev/#/patchset/20260524205112.26638-1-wafgo01%40gmail.com
It may well not be correct in all cases, but it often is!
The value of _scale seems like a plausible issue to me.
We have discussed expanding the range further than 9 decimal places
in the past. Seems like this might be the time we need to do it.
There is some work under review at the moment to allow more complex
fixed point handling but not sure it applies usefully here.
I also missed the crc table is global. Easy solution is take a copy.
Suspend / resume one is a value add for the future.
Jonathan