Re: [RFC PATCH v1 0/4] iio: add Sensirion SLF3x liquid flow sensor support
From: Jonathan Cameron
Date: Wed May 27 2026 - 14:53:26 EST
On Wed, 27 May 2026 16:34:58 +0200
Wadim Mueller <wafgo01@xxxxxxxxx> wrote:
> On Tue, 26 May 2026 17:12:14 +0100
> Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
>
> > > 1. Subsystem. Liquid-flow sensors don't seem to have a home in
> > > mainline yet. iio/ feels like the natural place for me, but
> > > please correct me if hwmon (or somewhere else) is prefered.
> >
> > I'm fine with this type of sensor in IIO, but open to hear from others!
>
> Thanks - keeping it in iio/ for v2.
>
> > > 2. Channel type. IIO has no flow channel type so far. The series
> > > adds IIO_VOLUMEFLOW with _scale in litres per second per LSB,
> > > so drivers reporting smaller units only need a fractional scale.
> > > IIO_MASSFLOW (for gas-flow sensors) was left out on purpose --
> > > happy to add it in the same series if that's more usefull.
> >
> > Would be good to have a little more detail on difference etc to have
> > that discussion. Superficially I'm assuming this is a compressible vs
> > non compressible thing?
>
> Right - that was the distinction I had in mind:
>
> - IIO_VOLUMEFLOW: volumetric rate (m^3/s in SI, exposed as l/s),
> well-defined for an incompressible fluid where the volume at the
> sensor equals the volume delivered. This matches all "liquid
> flow" sensors I'm aware of (and the SLF3S family in particular).
>
> - IIO_MASSFLOW: mass rate (kg/s), the natural unit for gases because
> the volumetric rate depends on temperature and pressure. Most
> "gas flow" parts on the market (Sensirion SFM3xxx, SFC, MFC
> devices) actually report a "standard volume flow" (e.g. slm at
> 0 degC and 1013 mbar) which is just a fixed-density restatement
> of mass flow.
Makes sense.
>
> I left IIO_MASSFLOW out of this series because I don't have a driver
> needing it right now, but if you'd prefer I add it as a stub here
> (name + ABI entry) so the two siblings land together, I can fold that
> in for v2 -- happy either way.
>
Nope. Good to discuss what it would look like in this over letter, but
the actual introduction needs to wait for a driver that uses it.
> > > 3. Subdirectory. I put the driver in a new drivers/iio/flow/
> > > since there is no flow subsytem in iio yet. If colocating with
> > > drivers/iio/pressure/ (next to sdp500) is preferred I'll respin.
> >
> > This is easy to change later if we make a wrong decision. For now I think
> > iio/flow is fine.
>
> Sticking with drivers/iio/flow/ for v2.
>
> Thanks!
>
> v2 is up, addressing the inline review feedback from you and Guenter.
> Dropping the RFC tag since the three high-level questions are
> answered.
>
> Wadim