Re: [RFC PATCH v1 2/4] dt-bindings: iio: flow: add Sensirion SLF3x liquid flow sensor
From: Wadim Mueller
Date: Wed May 27 2026 - 10:36:28 EST
On Tue, 26 May 2026 17:19:30 +0100
Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> > +description: |
> > + Family of digital liquid-flow sensors from Sensirion with I2C interface.
> > + The same register map is shared by all family members; sub-types differ
> > + only in the flow scale factor exposed by the device and are detected at
> > + probe time via the product-information register.
>
> Because that doesn't work for fallback compatibles, we often give devices
> their own compatibles anyway. Fine to also detect in driver but if we get
> something that falls back to an SLF3S-0600F I don't think there is any reason
> to think the subtype will match, so we have to trust DT to have given us
> all the necessary info.
Done in v2. Per-variant compatibles (sensirion,slf3s-0600f,
sensirion,slf3s-1300f, sensirion,slf3s-4000b) plus a generic
"sensirion,slf3s" fallback. The driver picks the variant from
compatible / id_table .data and uses the product-info sub-type
only as a sanity hint - unknown sub-type on a recognised
compatible is dev_dbg() now, which makes the fallback story
work for future SLF3S parts.
> > +properties:
> > + compatible:
> > + enum:
> > + - sensirion,slf3s
>
> If you don't expect to add more sensors this in near future would be fine
> as a const rather than an enum.
The enum stays (per-variant + fallback now), expressed as
`oneOf:` of `const:` and a list.
> > + reg:
> > + maxItems: 1
>
> There seems to be an irq. Given bindings should be complete that should
> be here even if the driver doesn't use it.
Done in v2. Optional `interrupts:` (maxItems: 1) - active-low
data-ready signal. Driver doesn't use it yet, but the binding
now matches the hardware.
> > +required:
> > + - compatible
> > + - reg
>
> vdd-supply presumably needed for device to function so should be here.
> From dt-binding point of view we don't care about the kernel providing
> stub regulators etc. The supply documentation should reflect what must
> actually be supplied.
Done in v2. vdd-supply is in `required:`, paired with
devm_regulator_get_enable() (no _optional) on the driver side.
Thanks,
Wadim