[PATCH v5 0/3] iio: health: add MAX86150 ECG and PPG biosensor driver
From: Md Shofiqul Islam
Date: Tue Jun 23 2026 - 16:11:39 EST
Changes in v5 (addressing Conor Dooley and Sashiko review of v4):
DT binding (Conor Dooley):
- Rename binding file and compatible to adi,max86150 per ADI policy for
former Maxim products.
- Add missing power supply properties: avdd-supply (analog core),
vref-supply (ECG reference); make all four supplies required.
- Fix vdd-supply description: remove voltage tolerances; say "1.8 V".
- Fix leds-supply description: say "typically 3.3 V" (datasheet max
is 5.0 V, not 5.5 V as previously stated).
- Rename example node to heart-rate@5e per prior DT art.
Driver (Sashiko):
- [High] Re-assign indio_dev->trig after trigger registration so the
hardware trigger is the default and iio_trigger_validate_own_device
accepts writes to current_trigger without a manual sysfs step.
iio_device_unregister() releases the reference via iio_trigger_put().
- [High] Switch from devm_request_irq() to devm_request_threaded_irq()
with IRQF_ONESHOT. A hard handler returning IRQ_HANDLED on a
level-triggered line unmasks the still-asserted INT pin and causes an
immediate re-fire loop. IRQF_ONESHOT keeps the line masked until
max86150_trigger_handler reads INT_STATUS1 and de-asserts the source.
- [Medium] Fix overflow timestamps: when OVF_COUNTER > 0, pf->timestamp
reflects an earlier A_FULL event and is no longer a valid anchor.
Capture ktime_get_ns() at drain time and reconstruct timestamps
relative to the newest surviving sample instead.
- [Medium] Pad fifo_raw to ARCH_DMA_MINALIGN bytes so that buf starts
in the next cacheline. Previously the 9-byte fifo_raw (DMA target)
and buf (CPU push buffer) shared a cacheline, violating DMA API
constraints flagged by CONFIG_DMA_API_DEBUG.
- [Medium] Replace blind usleep_range() in read_raw() with
regmap_read_poll_timeout() on the PPG_RDY bit. A fixed 11 ms sleep
risks reading an empty FIFO if the internal oscillator starts slower
than nominal; polling with a 25 ms timeout is robust.
Link: https://lore.kernel.org/linux-iio/20260623174600.17100-1-shofiqtest@xxxxxxxxx/
v4 cover letter
Md Shofiqul Islam (3):
dt-bindings: iio: health: add adi,max86150
iio: health: add MAX86150 ECG and PPG biosensor driver
MAINTAINERS: add entry for MAX86150 IIO health driver
.../bindings/iio/health/adi,max86150.yaml | 78 ++
MAINTAINERS | 7 +
drivers/iio/health/Kconfig | 23 +
drivers/iio/health/Makefile | 1 +
drivers/iio/health/max86150.c | 730 ++++++++++++++++++
5 files changed, 839 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/health/adi,max86150.yaml
create mode 100644 drivers/iio/health/max86150.c
--
2.51.1