From: Md Shofiqul Islam <shofiqtest@gmail.com>
To: linux-iio@vger.kernel.org
Cc: jic23@kernel.org, dlechner@baylibre.com, nuno.sa@analog.com,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
devicetree@vger.kernel.org, joshua.crofts1@gmail.com,
Md Shofiqul Islam <shofiqtest@gmail.com>
Subject: [PATCH v2 0/3] iio: health: add MAX86150 ECG and PPG biosensor driver
Date: Tue, 23 Jun 2026 18:55:53 +0300 [thread overview]
Message-ID: <20260623155556.13701-1-shofiqtest@gmail.com> (raw)
In-Reply-To: <20260623140113.12574-1-shofiqtest@gmail.com>
The MAX86150 (Maxim/Analog Devices) combines two PPG optical channels
(Red/IR LED) and one ECG biopotential channel in a single I2C device.
Data is produced at up to 3200 Hz and buffered in a 32-entry hardware
FIFO with a configurable almost-full interrupt.
This series adds:
1. DT binding YAML schema for maxim,max86150
2. IIO driver with triggered buffer support
3. MAINTAINERS entry
Changes in v2 (addressing Sashiko AI review, Joshua Crofts, Krzysztof Kozlowski):
- Fix buffer overflow: expand scan buffer to s32 buf[6] to hold
3 x s32 channels + 4-byte pad + s64 timestamp (24 bytes total)
- Add iio_device_claim_direct() in read_raw to prevent concurrent
sysfs reads from corrupting FIFO pointers during buffer capture
- Fix FIFO-full detection: read OVF_COUNTER to distinguish a fully
saturated FIFO (wr_ptr == rd_ptr after wrap) from an empty one
- Fix active_scan_mask handling: pack only active channels at
consecutive positions using test_bit(idx, active_scan_mask)
- Remove IRQF_ONESHOT from IRQ request (not needed for edge-triggered;
iio_trigger_generic_data_rdy_poll is a hard-IRQ handler)
- Add set_trigger_state callback to enable/disable A_FULL interrupt
only when the IIO buffer is active, preventing the interrupt line
from asserting before the handler is registered
- Fix endianness: change scan_type.endianness from IIO_LE to IIO_CPU
to match native integers written directly into the buffer
- Add max86150_powerdown() devm action to disable interrupts and
assert SYS_SHDN on driver unload
- Add devm_regulator_get_enable() for vdd-supply and leds-supply
before any I2C access
- Add devm action for iio_trigger_put() to balance the reference
count increment from iio_trigger_get()
- Split DT binding into a separate first patch (requested by Joshua Crofts)
- Add MAINTAINERS entry (requested by Joshua Crofts)
Known limitations (to be addressed in v3):
- IIO_CHAN_INFO_SCALE not yet implemented
- Runtime PM (SYS_CTRL SHDN bit) not yet implemented
- Not yet tested on physical hardware
Md Shofiqul Islam (3):
dt-bindings: iio: health: add maxim,max86150
iio: health: add MAX86150 ECG and PPG biosensor driver
MAINTAINERS: add entry for MAX86150 IIO health driver
.../bindings/iio/health/maxim,max86150.yaml | 67 ++
MAINTAINERS | 7 +
drivers/iio/health/Kconfig | 18 +
drivers/iio/health/Makefile | 1 +
drivers/iio/health/max86150.c | 612 ++++++++++++++++++
5 files changed, 705 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/health/maxim,max86150.yaml
create mode 100644 drivers/iio/health/max86150.c
--
2.51.1
next prev parent reply other threads:[~2026-06-23 15:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 14:01 [PATCH 0/1] iio: health: add MAX86150 ECG and PPG biosensor driver Md Shofiqul Islam
2026-06-23 14:01 ` [PATCH 1/1] " Md Shofiqul Islam
2026-06-23 14:14 ` sashiko-bot
2026-06-23 14:38 ` Joshua Crofts
2026-06-23 15:38 ` Krzysztof Kozlowski
2026-06-23 15:55 ` Md Shofiqul Islam [this message]
2026-06-23 15:55 ` [PATCH v2 1/3] dt-bindings: iio: health: add maxim,max86150 Md Shofiqul Islam
2026-06-23 16:02 ` sashiko-bot
2026-06-23 15:55 ` [PATCH v2 2/3] iio: health: add MAX86150 ECG and PPG biosensor driver Md Shofiqul Islam
2026-06-23 16:12 ` sashiko-bot
2026-06-23 15:55 ` [PATCH v2 3/3] MAINTAINERS: add entry for MAX86150 IIO health driver Md Shofiqul Islam
2026-06-23 16:43 ` [PATCH v3 0/3] iio: health: add MAX86150 ECG and PPG biosensor driver Md Shofiqul Islam
2026-06-23 16:43 ` [PATCH v3 1/3] dt-bindings: iio: health: add maxim,max86150 Md Shofiqul Islam
2026-06-23 16:43 ` [PATCH v3 2/3] iio: health: add MAX86150 ECG and PPG biosensor driver Md Shofiqul Islam
2026-06-23 16:57 ` sashiko-bot
2026-06-23 16:43 ` [PATCH v3 3/3] MAINTAINERS: add entry for MAX86150 IIO health driver Md Shofiqul Islam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260623155556.13701-1-shofiqtest@gmail.com \
--to=shofiqtest@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=joshua.crofts1@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox