zephyr,flow-meter

Description

Hall-effect pulse-output flow meter.

The sensor outputs one pulse per fixed volume increment on pulse-gpios.
The driver counts pulses and converts to volume using pulses-per-liter.
Volume is reported on SENSOR_CHAN_VOLUME (liters, val1 = whole liters,
val2 = microliters), flow rate on SENSOR_CHAN_FLOW_RATE (L/min).
Runtime calibration is available via SENSOR_ATTR_CALIBRATION
(val1 = pulses/liter, val2 = 0). Volume threshold triggers use
SENSOR_TRIG_THRESHOLD on SENSOR_CHAN_VOLUME with SENSOR_ATTR_UPPER_THRESH
(one-shot, disarms after firing or on NULL handler).

Properties

Properties not inherited from the base binding file.

Name

Type

Details

pulse-gpios

phandle-array

Input GPIO connected to the Hall-effect sensor output.
Each active edge represents one pulse (volume increment).

This property is required.

power-gpios

phandle-array

Optional GPIO used to power the flow meter module.
Driven active during initialization and held throughout operation.

pulses-per-liter

int

Number of pulses produced per liter of flow.
This is the factory calibration value for the specific sensor and
can be overridden at runtime via SENSOR_ATTR_CALIBRATION.

This property is required.

Minimum value: 1

friendly-name

string

Human readable string describing the sensor. It can be used to
distinguish multiple instances of the same model (e.g., lid accelerometer
vs. base accelerometer in a laptop) to a host operating system.

This property is defined in the Generic Sensor Property Usages of the HID
Usage Tables specification
(https://usb.org/sites/default/files/hut1_3_0.pdf, section 22.5).