# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/flow/sensirion,slf3s.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Sensirion SLF3S liquid flow sensor

maintainers:
  - Wadim Mueller <wafgo01@gmail.com>

description:
  Family of digital liquid-flow sensors from Sensirion with I2C interface. All
  family members share the same register map; sub-types differ only in the flow
  scale factor and the calibrated measurement range. The sub-type can be
  identified from the product-information register.

properties:
  compatible:
    enum:
      - sensirion,slf3s-0600f
      - sensirion,slf3s-1300f
      - sensirion,slf3s-4000b

  reg:
    maxItems: 1

  vdd-supply: true

  interrupts:
    maxItems: 1

required:
  - compatible
  - reg
  - vdd-supply

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>

    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        flow-sensor@8 {
            compatible = "sensirion,slf3s-0600f";
            reg = <0x08>;
            vdd-supply = <&reg_3v3>;
            interrupt-parent = <&gpio0>;
            interrupts = <0 IRQ_TYPE_EDGE_RISING>;
        };
    };