Re: [RFC PATCH v1 1/4] iio: types: add IIO_VOLUMEFLOW channel type
From: Wadim Mueller
Date: Wed May 27 2026 - 10:38:41 EST
On Tue, 26 May 2026 16:59:50 +0100
Jonathan Cameron <jic23@xxxxxxxxxx> 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 ?
>
> I'd rather we went to the SI units where possible.
Agreed - SI in v2. in_volumeflow_raw / _scale stays in l/s
(rescaled SI m^3/s, matching the rest of IIO's "kept-small-for-
userspace" convention). The ABI doc and a driver comment call
that out.
On the gas-flow question: rather than adding IIO_MASSFLOW now
without a driver, I dropped the "liquid" wording from the channel
type doc. The SLF3S driver is liquid-only, but the channel type
itself just means "volumetric flow rate" and could describe a gas
sensor reporting actual volume rate just as well. IIO_MASSFLOW
for standard-volume / mass-equivalent gas flow can come later
when a driver shows up.
Thanks,
Wadim