Re: [PATCH v3 1/3] iio: types: add IIO_VOLUMEFLOW channel type

From: Wadim Mueller

Date: Sun Jun 07 2026 - 06:52:42 EST


On Thu, 4 Jun 2026 09:44:36 +0100
Jonathan Cameron <jic23@xxxxxxxxxx> wrote:

> Yes, I'd prefer that for consistency (m^3/sec). Hopefully the scaling is
> fine with the new forms that are happy with more leading zeros.

Ok for m^3/s if you prefer SI, but two things before i switch:

1) The scaling is not quite fine with pico. In m^3/s the SLF3S-0600F scale
is ~1.667e-12, so IIO_VAL_DECIMAL64_PICO keeps only a single digit
again. It would need IIO_VAL_DECIMAL64_FEMTO, which Rodrigo's series
does not define yet (only MILLI..PICO). Rodrigo, you offered FEMTO
earlier - could you add it? Then i base v4 on top of it.

2) Honestly m^3/s feels quite far from reality for these parts. They are
liquid flow sensors; even the largest variant (4000B) tops out at
600 ml/min = 1e-5 m^3/s, so no value is ever close to 1 - everything
sits between ~1e-12 and ~1e-5. l/s keeps the numbers in a saner range
and pico is enough (no new core type needed). IIO also uses practical
units in a few places already (kPa, milli-degC) instead of strict SI.

So i'm fine either way, but m^3/s costs us a new FEMTO core type for a
mostly cosmetic unit choice, while l/s works with what Rodrigo already
has. What do you prefer?

Wadim