Re: [RFC PATCH v1 1/4] iio: types: add IIO_VOLUMEFLOW channel type
From: Wadim Mueller
Date: Wed May 27 2026 - 10:37:49 EST
On Sun, 24 May 2026 14:39:06 -0700
Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
> Two questions: Why restricting to liquid (there are also gas flow sensors),
> and why litres/second and not per minute which seems to be a more common
> unit ?
Both fair points - Jonathan weighed in on the same thread [1],
so summarising for v2:
1. Liquid vs gas. Channel type in v2 just says "volumetric
flow rate" - no "liquid" qualifier. A liquid-only sensor
like SLF3S uses it directly, a gas sensor reporting actual
volumetric flow uses it too. Standard-volume / density-
equivalent gas flow is mass flow at heart and will get its
own IIO_MASSFLOW when a driver needs it, rather than
overloading IIO_VOLUMEFLOW.
2. Per second vs per minute. Going with seconds (l/s, later
kg/s) because the rest of IIO is SI-based: integration_time,
sampling_frequency, accel etc. are all per-second. Drivers
whose native unit is per-minute fold the 1/60 into _scale,
same as SLF3S does.
[1] https://lore.kernel.org/all/20260526165950.6ebbf673@jic23-huawei/
Thanks,
Wadim