Devicetree
 help / color / mirror / Atom feed
From: Md Shofiqul Islam <shofiqtest@gmail.com>
To: linux-iio@vger.kernel.org
Cc: jic23@kernel.org, devicetree@vger.kernel.org, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org,
	andriy.shevchenko@intel.com, u.kleine-koenig@baylibre.com,
	joshua.crofts1@gmail.com
Subject: [PATCH v9 0/2] iio: health: add MAX86150 ECG and PPG biosensor driver
Date: Tue,  7 Jul 2026 14:27:12 +0300	[thread overview]
Message-ID: <20260707112714.2261727-1-shofiqtest@gmail.com> (raw)

Add DT bindings and an IIO driver for the Analog Devices MAX86150
integrated biosensor, which combines two PPG optical channels (Red/IR
LED) and one ECG biopotential channel in a single I2C device.

Md Shofiqul Islam (2):
  dt-bindings: iio: health: add adi,max86150
  iio: health: add MAX86150 ECG and PPG biosensor driver

 .../bindings/iio/health/adi,max86150.yaml     |  65 ++
 MAINTAINERS                                   |   7 +
 drivers/iio/health/Kconfig                    |  17 +
 drivers/iio/health/Makefile                   |   1 +
 drivers/iio/health/max86150.c                 | 564 ++++++++++++++++++
 5 files changed, 654 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/health/adi,max86150.yaml
 create mode 100644 drivers/iio/health/max86150.c

Changes in v9:
- Split MAINTAINERS correctly: M:/L:/S:/F: yaml entry in DT binding
  patch, F: .c entry added in driver patch (Joshua Crofts, Jonathan
  Cameron)
- Reorder includes: move linux/iio/* group after linux/module.h,
  linux/regmap.h, linux/regulator/consumer.h (Andy Shevchenko)
- Add linux/timekeeping.h for ktime_get_ns() (IWYU)
- Add synchronize_irq() in predisable() after masking the hardware
  interrupt, preventing a race where a threaded handler in flight
  dereferences active_scan_mask after the IIO core clears it
- Clear INT_STATUS1 before regmap_read_poll_timeout() to avoid
  latching on a stale PPG_RDY flag from a previous session
- Detect FIFO exactly-full condition (wr_ptr == rd_ptr with
  OVF_COUNTER == 0) using the A_FULL status bit so that a full
  32-sample FIFO is not silently treated as empty
- Use unsigned int for FIFO pointer and counter variables; use s32
  for ECG and u32 for PPG values throughout
- Use local struct device *dev in probe() to reduce code repetition
- Remove explicit enum values from scan index (= 0, 1, 2); let
  C auto-increment assign them consistently
- Use named .name initializer in i2c_device_id[] (Uwe Kleine-Koenig,
  already in v8)

Changes in v8:
- Fold MAINTAINERS entry into the driver patch rather than a separate
  patch (Joshua Crofts, Jonathan Cameron)
- Use named .name initializer in i2c_device_id[] (Uwe Kleine-Koenig)

Changes in v7:
- Replace devm_iio_triggered_buffer_setup() with
  devm_iio_kfifo_buffer_setup() to match FIFO-drain pattern
- Use regmap_noinc_read() for burst FIFO reads
- Use IIO_DECLARE_BUFFER_WITH_TS and iio_push_to_buffers_with_ts()
- Back-calculate per-sample timestamps from IRQ arrival time
- Use IIO_DMA_MINALIGN for DMA-safe FIFO read buffer
- Use fsleep() instead of msleep() for short delays
- Use NSEC_PER_MSEC constant for sample period
- Use devm_regulator_get_enable() for power supplies
- Use regmap_set_bits()/regmap_clear_bits() for single-direction writes
- Return IRQ_NONE when A_FULL is not set
- Discard samples on FIFO overflow (timestamps unreliable)
- Add devm_add_action_or_reset() cleanup for power-down on error
- Add FIFO overflow detection and reset
- Use regmap_read_poll_timeout() instead of fixed sleep in read_raw

-- 
2.51.1

             reply	other threads:[~2026-07-07 11:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-07 11:27 Md Shofiqul Islam [this message]
2026-07-07 11:33 ` [PATCH v9 0/2] iio: health: add MAX86150 ECG and PPG biosensor driver Joshua Crofts
2026-07-07 15:08 ` Andy Shevchenko

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=20260707112714.2261727-1-shofiqtest@gmail.com \
    --to=shofiqtest@gmail.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=joshua.crofts1@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=u.kleine-koenig@baylibre.com \
    /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